Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1391 → Rev 1392

/branches/Version13x/Scribus/scribus/mpalette.cpp
949,6 → 949,7
}
if (kk == Key_F10)
emit ToggleAllPalettes();
/* CB TODO
if ((kk + KeyMod) == ScApp->Prefs.KeyActions[46].KeyID)
emit Schliessen();
if ((kk + KeyMod) == ScApp->Prefs.KeyActions[47].KeyID)
955,6 → 956,7
emit CloseTpal();
if ((kk + KeyMod) == ScApp->Prefs.KeyActions[48].KeyID)
emit CloseBpal();
*/
QDialog::keyPressEvent(k);
}
 
1104,8 → 1106,8
connect(Textflow3, SIGNAL(clicked()), this, SLOT(DoFlow3()));
disconnect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH()));
disconnect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV()));
FlipH->setOn((i->flippedH % 2 != 0));
FlipV->setOn((i->flippedV % 2 != 0));
FlipH->setOn(i->imageFlippedH());
FlipV->setOn(i->imageFlippedV());
connect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH()));
connect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV()));
ToggleFlow();
1130,7 → 1132,7
connect(startArrow, SIGNAL(activated(int)), this, SLOT(setStartArrow(int )));
connect(endArrow, SIGNAL(activated(int)), this, SLOT(setEndArrow(int )));
NoPrint->setOn(!i->isPrintable);
setter = i->Locked;
setter = i->locked();
Kette2->setOn(false);
Width->setReadOnly(setter);
Height->setReadOnly(setter);
1154,14 → 1156,14
Xpos->setReadOnly(setter);
Ypos->setReadOnly(setter);
Rot->setReadOnly(setter);
setter = i->LockRes;
setter = i->sizeLocked();
NoResize->setOn(setter);
if (!i->Locked)
if (!i->locked())
{
Width->setReadOnly(setter);
Height->setReadOnly(setter);
}
if (i->Locked)
if (i->locked())
{
HaveItem = true;
return;
2863,12 → 2865,12
{
if (Revert->isOn())
{
CurItem->flippedH = 1;
CurItem->setImageFlippedH(true);
CurItem->Reverse = true;
}
else
{
CurItem->flippedH = 0;
CurItem->setImageFlippedV(false);
CurItem->Reverse = false;
}
ScApp->view->RefreshItem(CurItem);
3133,7 → 3135,7
{
if (ScApp->view->SelItem.count() > 1)
{
if (ScApp->view->SelItem.at(0)->Locked)
if (ScApp->view->SelItem.at(0)->locked())
ScApp->view->undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::UnLock, 0, Um::IUnLock);
else
3179,7 → 3181,7
{
if (ScApp->view->SelItem.count() > 1)
{
if (ScApp->view->SelItem.at(0)->LockRes)
if (ScApp->view->SelItem.at(0)->sizeLocked())
ScApp->view->undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::SizeUnLock, 0, Um::IUnLock);
else
/branches/Version13x/Scribus/scribus/util.cpp
1816,8 → 1816,8
Buffer->LocalX = b->LocalX;
Buffer->LocalY = b->LocalY;
Buffer->PicArt = b->PicArt;
Buffer->flippedH = b->flippedH;
Buffer->flippedV = b->flippedV;
Buffer->flippedH = b->imageFlippedH();
Buffer->flippedV = b->imageFlippedV();
Buffer->BBoxX = b->BBoxX;
Buffer->BBoxH = b->BBoxH;
Buffer->isPrintable = b->isPrintable;
1912,8 → 1912,8
Buffer->LayerNr = b->LayerNr;
Buffer->ScaleType = b->ScaleType;
Buffer->AspectRatio = b->AspectRatio;
Buffer->Locked = b->Locked;
Buffer->LockRes = b->LockRes;
Buffer->Locked = b->locked();
Buffer->LockRes = b->sizeLocked();
Buffer->Transparency = b->Transparency;
Buffer->TranspStroke = b->TranspStroke;
Buffer->Reverse = b->Reverse;
2133,8 → 2133,8
OB->LocalX=QStodouble(obj->attribute("LOCALX"));
OB->LocalY=QStodouble(obj->attribute("LOCALY"));
OB->PicArt=QStoInt(obj->attribute("PICART"));
OB->flippedH=QStoInt(obj->attribute("FLIPPEDH"));
OB->flippedV=QStoInt(obj->attribute("FLIPPEDV"));
OB->flippedH = QStoInt(obj->attribute("FLIPPEDH"));
OB->flippedV = QStoInt(obj->attribute("FLIPPEDV"));
OB->BBoxX=QStodouble(obj->attribute("BBOXX"));
OB->BBoxH=QStodouble(obj->attribute("BBOXH"));
OB->ScaleType = QStoInt(obj->attribute("SCALETYPE","1"));
/branches/Version13x/Scribus/scribus/undogui.cpp
239,7 → 239,7
undoList->setMultiSelection(false);
undoList->setSelectionMode(QListBox::Single);
layout->addWidget(undoList);
ScApp->scrActions["editUndoAction"]->addTo(this);
QHBoxLayout* buttonLayout = new QHBoxLayout(0, 0, 5, "buttonLayout");
undoButton = new QPushButton(loadIcon("u_undo.png"),
tr("&Undo"), this,
/branches/Version13x/Scribus/scribus/keymanager.h
18,10 → 18,10
Q_OBJECT
 
public:
KeyManager( QWidget* parent, QMap<int, Keys> oldKeyMap);
KeyManager( QWidget* parent, QMap<QString, Keys> oldKeyMap);
~KeyManager() {};
 
const QMap<int, Keys> getNewKeyMap();
const QMap<QString, Keys> getNewKeyMap();
bool event( QEvent* ev );
void keyPressEvent(QKeyEvent *k);
void keyReleaseEvent(QKeyEvent *k);
43,8 → 43,9
QLabel* keyDisplay;
QPushButton* setKeyButton;
QHeader *header;
QMap<int,Keys> keyMap;
int actRow;
QMap<QString,Keys> keyMap;
QMap<QString,Keys>::Iterator currentKeyMapRow;
int currRow;
int keyCode;
QString Part1;
QString Part2;
/branches/Version13x/Scribus/scribus/scribusXml.h
42,7 → 42,7
void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master);
bool WriteDoc(QString fileName, ScribusDoc *docu, QProgressBar *dia2);
void WritePref(ApplicationPrefs *Vor, QString ho);
bool ReadPref(struct ApplicationPrefs *Vorein, QString ho, SplashScreen *splash);
bool ReadPref(struct ApplicationPrefs *Vorein, QString ho, SplashScreen *splash, bool import12);
ColorList Farben;
QValueList<ParagraphStyle> docParagraphStyles;
struct Linked
/branches/Version13x/Scribus/scribus/keymanager.cpp
5,8 → 5,9
#include <qmessagebox.h>
#include <qkeysequence.h>
 
KeyManager::KeyManager(QWidget* parent, QMap<int,Keys> oldKeyMap): QWidget( parent, "key" )
KeyManager::KeyManager(QWidget* parent, QMap<QString,Keys> oldKeyMap): QWidget( parent, "key" )
{
keyMap.clear();
keyMap = oldKeyMap;
Part1 = "";
Part2 = "";
17,12 → 18,15
 
keyTable = new QTable( oldKeyMap.count(), 2, this, "keyTable" );
keyTable->setMaximumSize(QSize(500,200));
for (uint a = 0; a < oldKeyMap.count(); ++a)
uint a=0;
for (QMap<QString,Keys>::Iterator it=keyMap.begin(); it!=keyMap.end(); ++it)
{
QTableItem *it = new QTableItem(keyTable, QTableItem::Never, oldKeyMap[a].Name);
keyTable->setItem(a, 0, it);
QTableItem *it2 = new QTableItem(keyTable, QTableItem::Never, getKeyText(oldKeyMap[a].KeyID));
keyTable->setItem(a, 1, it2);
QTableItem *item = new QTableItem(keyTable, QTableItem::Never, it.data().cleanMenuText);
keyTable->setItem(a, 0, item);
QTableItem *item2 = new QTableItem(keyTable, QTableItem::Never, QString(it.data().keySequence));
keyTable->setItem(a, 1, item2);
it.data().tableRow=a;
++a;
}
keyTable->setSorting(false);
keyTable->setSelectionMode(QTable::NoSelection);
122,15 → 126,18
tr("Warning"),
tr("This Key Sequence is already in use"),
tr("&OK"), 0, 0, 0, QMessageBox::Ok);
keyTable->setText(actRow, 1, "");
keyTable->setText(currRow, 1, "");
keyDisplay->setText("");
keyMap[actRow].KeyID = 0;
if (currentKeyMapRow!=NULL)
currentKeyMapRow.data().keySequence="";
noKey->setChecked(true);
}
else
{
keyTable->setText(actRow, 1, getKeyText(keyCode));
keyMap[actRow].KeyID = keyCode;
QString newKeySequence=QString(QKeySequence(keyCode));
keyTable->setText(currRow, 1, newKeySequence);
if (currentKeyMapRow!=NULL)
currentKeyMapRow.data().keySequence=newKeySequence;
userDef->setChecked(true);
}
setKeyButton->setOn(false);
192,11 → 199,20
void KeyManager::dispKey(int row)
{
keyDisplay->setText(keyTable->text(row, 1));
if (keyMap[row].KeyID == 0)
noKey->setChecked(true);
else
userDef->setChecked(true);
actRow = row;
keyTable->setText(row, 1, keyTable->text(row, 1));
for (QMap<QString,Keys>::Iterator it=keyMap.begin(); it!=keyMap.end(); ++it)
{
if (it.data().tableRow == row)
{
if (it.data().keySequence == "")
noKey->setChecked(true);
else
userDef->setChecked(true);
currentKeyMapRow=it;
}
}
currRow = row;
}
 
void KeyManager::setNoKey()
203,9 → 219,10
{
if (noKey->isChecked())
{
keyTable->setText(actRow, 1, "");
keyTable->setText(currRow, 1, "");
keyDisplay->setText("");
keyMap[actRow].KeyID = 0;
if (currentKeyMapRow!=NULL)
currentKeyMapRow.data().keySequence="";
}
}
 
217,9 → 234,9
bool KeyManager::checkKey(int code)
{
bool ret = false;
for (uint a = 0; a < keyMap.count(); ++a)
for (QMap<QString,Keys>::Iterator it=keyMap.begin(); it!=keyMap.end(); ++it)
{
if (keyMap[a].KeyID == code)
if (it.data().keySequence == QString(QKeySequence(code)))
{
ret = true;
break;
228,7 → 245,7
return ret;
}
 
const QMap<int, Keys> KeyManager::getNewKeyMap()
const QMap<QString, Keys> KeyManager::getNewKeyMap()
{
return keyMap;
}
/branches/Version13x/Scribus/scribus/scribusXml.cpp
222,8 → 222,8
ob->setAttribute("PICART", item->PicArt ? 1 : 0);
ob->setAttribute("PLTSHOW", item->PoShow ? 1 : 0);
ob->setAttribute("BASEOF", item->BaseOffs);
ob->setAttribute("FLIPPEDH",item->flippedH);
ob->setAttribute("FLIPPEDV",item->flippedV);
ob->setAttribute("FLIPPEDH", item->imageFlippedH());
ob->setAttribute("FLIPPEDV", item->imageFlippedV());
ob->setAttribute("BBOXX",item->BBoxX);
ob->setAttribute("BBOXH",item->BBoxH);
ob->setAttribute("IFONT",item->IFont);
298,8 → 298,8
ob->setAttribute("EPROF", item->EmProfile);
ob->setAttribute("IRENDER",item->IRender);
ob->setAttribute("EMBEDDED", item->UseEmbedded ? 1 : 0);
ob->setAttribute("LOCK", item->Locked ? 1 : 0);
ob->setAttribute("LOCKR", item->LockRes ? 1 : 0);
ob->setAttribute("LOCK", item->locked() ? 1 : 0);
ob->setAttribute("LOCKR", item->sizeLocked() ? 1 : 0);
ob->setAttribute("REVERS", item->Reverse ? 1 : 0);
ob->setAttribute("INVERS", item->InvPict ? 1 : 0);
ob->setAttribute("TransValue", item->Transparency);
3084,12 → 3084,11
rde.setAttribute("NAME",Vor->RecentDocs[rd]);
elem.appendChild(rde);
}
for (uint ksc=0; ksc<68; ++ksc)
for (QMap<QString,Keys>::Iterator ksc=Vor->KeyActions.begin(); ksc!=Vor->KeyActions.end(); ++ksc)
{
QDomElement kscc=docu.createElement("SHORTCUT");
kscc.setAttribute("CODE",Vor->KeyActions[ksc].KeyID);
kscc.setAttribute("ACTION",Vor->KeyActions[ksc].actionName);
kscc.setAttribute("NR", ksc);
kscc.setAttribute("ACTION",ksc.data().actionName);
kscc.setAttribute("SEQUENCE",QString(ksc.data().keySequence));
elem.appendChild(kscc);
}
QMap<QString,QString>::Iterator itfsu;
3162,7 → 3161,7
f.close();
}
 
bool ScriXmlDoc::ReadPref(struct ApplicationPrefs *Vorein, QString ho, SplashScreen *splash)
bool ScriXmlDoc::ReadPref(struct ApplicationPrefs *Vorein, QString ho, SplashScreen *splash, bool import12)
{
QDomDocument docu("scridoc");
QFile f(ho);
3359,10 → 3358,10
Vorein->nodePalSettings.xPosition = QStoInt(dc.attribute("XPOS"));
Vorein->nodePalSettings.yPosition = QStoInt(dc.attribute("YPOS"));
}
if (dc.tagName()=="SHORTCUT")
{
Vorein->KeyActions[QStoInt(dc.attribute("NR"))].KeyID = QStoInt(dc.attribute("CODE"));
Vorein->KeyActions[QStoInt(dc.attribute("NR"))].actionName = dc.attribute("ACTION","");
if (!import12 && dc.tagName()=="SHORTCUT")
{
Vorein->KeyActions[dc.attribute("ACTION")].actionName = dc.attribute("ACTION");
Vorein->KeyActions[dc.attribute("ACTION")].keySequence = dc.attribute("SEQUENCE");
}
if (dc.tagName()=="RECENT")
Vorein->RecentDocs.append(dc.attribute("NAME"));
/branches/Version13x/Scribus/scribus/story.cpp
189,6 → 189,7
break;
}
QString uc = k->text();
/*CB TODO
if ((k->key() + KeyMod) == ScApp->Prefs.KeyActions[60].KeyID)
{
insChars(QString(QChar(30)));
196,6 → 197,7
emit SideBarUp(true);
return;
}
*/
switch (k->state())
{
case ControlButton:
/branches/Version13x/Scribus/scribus/pageitem.h
49,6 → 49,8
Q_PROPERTY(double lineTransparency READ lineTransparency WRITE setLineTransparency DESIGNABLE false)
Q_PROPERTY(bool locked READ locked WRITE setLocked DESIGNABLE false)
Q_PROPERTY(bool sizeLocked READ sizeLocked WRITE setSizeLocked DESIGNABLE false)
Q_PROPERTY(bool imageFlippedV READ imageFlippedV WRITE setImageFlippedV DESIGNABLE false)
Q_PROPERTY(bool imageFlippedH READ imageFlippedH WRITE setImageFlippedH DESIGNABLE false)
public:
PageItem(ScribusDoc *pa, int art, double x, double y, double w, double h, double w2, QString fill, QString outline);
~PageItem() {};
76,8 → 78,6
void DrawZeichenS(ScPainter *p, struct ZZ *hl);
void DrawPolyL(QPainter *p, QPointArray pts);
QString ExpandToken(uint base);
bool Locked;
bool LockRes;
bool Reverse;
/** X-Position auf der Seite */
double Xpos;
183,10 → 183,6
int OrigH;
double dpiX;
double dpiY;
/** Anzahl horizontaler Spiegelungen */
int flippedH;
/** Anzahl vertikaler Spiegelungen */
int flippedV;
/** BoundigBox-X */
double BBoxX;
/** BoundingBox-H */
401,11 → 397,18
* @sa Qt::PenJoinStyle
*/
void setLineJoin(PenJoinStyle newStyle);
 
/** @brief Is the image flipped horizontally? */
bool imageFlippedH() const;
/** @brief Horizontally flip / unflip the image */
void setImageFlippedH(bool flipped);
 
/**
* @brief Set custom line style
* @param newStyle name of the custom style
*/
void setCustomLineStyle(const QString& newStyle);
 
/**
* @brief Set start arrow index
* @param newIndex index for start arrow
416,8 → 419,14
* @param newIndex index for end arrow
*/
void setEndArrowIndex(int newIndex);
 
/** @brief Flip an image horizontally. */
void flipImageH();
 
/** @brief Is the image flipped vertically? */
bool imageFlippedV() const;
/** @brief Vertically flip / unflip the image */
void setImageFlippedV(bool flipped);
/** @brief Flip an image vertically */
void flipImageV();
 
497,10 → 506,35
 
/**
* @brief Item name. Unicode. User visible (outline, property palette, etc).
*
* See PageItem::itemName(), PageItem::setItemName()
* */
* @sa PageItem::itemName(), PageItem::setItemName()
*/
QString AnName;
 
/**
* @brief Is the image in this image item flipped horizontally?
* @sa PageItem::isImageFlippedH(), PageItem::setImageFlippedH(),
* PageItem::flipImageH(), PageItem::flippedV
*/
bool imageIsFlippedH;
 
/**
* @brief Is the image in this image item flipped vertically?
* @sa PageItem::isImageFlippedV(), PageItem::setImageFlippedV(),
* PageItem::flipImageV(), PageItem::flippedH
*/
bool imageIsFlippedV;
 
/**
* @brief Is the item locked (cannot be moved, resized, etc)?
* @sa PageItem::locked(), PageItem::setLocked(), PageItem::toggleLock()
*/
bool Locked;
 
/**
* @brief Is the item's size locked?
* @sa PageItem::sizeLocked(), PageItem::setSizeLocked(), PageItem::toggleSizeLock()
*/
bool LockRes;
};
 
#endif
/branches/Version13x/Scribus/scribus/scribusstructs.h
83,8 → 83,8
double LocalX;
double LocalY;
bool PicArt;
int flippedH;
int flippedV;
bool flippedH;
bool flippedV;
double BBoxX;
double BBoxH;
bool isPrintable;
316,10 → 316,10
 
struct Keys
{
QString Name;
int MenuID;
int KeyID;
QString actionName;
QString cleanMenuText;
QString keySequence;
int tableRow;
};
 
/** Definition der Farbenlisten */
461,7 → 461,7
QStringList RecentDocs;
uint RecentDCount;
CMSData DCMSset;
QMap<int,Keys> KeyActions;
QMap<QString,Keys> KeyActions;
QString PrinterName;
QString PrinterFile;
QString PrinterCommand;
/branches/Version13x/Scribus/scribus/scrap.cpp
51,6 → 51,7
}
if (kk == Key_F10)
emit ToggleAllPalettes();
/* CB TODO
if ((kk + KeyMod) == Prefs->KeyActions[46].KeyID)
emit CloseMpal();
if ((kk + KeyMod) == Prefs->KeyActions[47].KeyID)
57,6 → 58,7
emit CloseTpal();
if ((kk + KeyMod) == Prefs->KeyActions[48].KeyID)
emit Schliessen();
*/
QIconView::keyPressEvent(k);
}
 
/branches/Version13x/Scribus/scribus/pageitem.cpp
134,8 → 134,8
dpiY = 72.0;
LocalX = 0;
LocalY = 0;
flippedH = 0;
flippedV = 0;
imageIsFlippedH = 0;
imageIsFlippedV = 0;
BBoxX = 0;
BBoxH = 0;
RadRect = 0;
448,12 → 448,12
p->setupPolygon(&PoLine);
p->setClipPath();
p->save();
if (flippedH % 2 != 0)
if (imageFlippedH())
{
p->translate(Width * sc, 0);
p->scale(-1, 1);
}
if (flippedV % 2 != 0)
if (imageFlippedV())
{
p->translate(0, Height * sc);
p->scale(1, -1);
667,12 → 667,12
}
if ((itemText.count() != 0) && (Dirty))
{
if (flippedH % 2 != 0)
if (imageFlippedH())
{
p->translate(Width * sc, 0);
p->scale(-1, 1);
}
if (flippedV % 2 != 0)
if (imageFlippedV())
{
p->translate(0, Height * sc);
p->scale(1, -1);
807,7 → 807,7
}
}
}
if (flippedH % 2 != 0)
if (imageFlippedH())
{
p->translate(Width * sc, 0);
p->scale(-1, 1);
814,7 → 814,7
pf2.translate(Width, 0);
pf2.scale(-1, 1);
}
if (flippedV % 2 != 0)
if (imageFlippedV())
{
p->translate(0, Height * sc);
p->scale(1, -1);
2445,6 → 2445,17
PLineJoin = newStyle;
}
 
bool PageItem::imageFlippedH() const
{
return imageIsFlippedH;
}
 
void PageItem::setImageFlippedH(bool flipped)
{
if (flipped != imageIsFlippedH)
flipImageH();
}
 
void PageItem::setCustomLineStyle(const QString& newStyle)
{
if (UndoManager::undoEnabled())
2496,9 → 2507,20
ss->set("IMAGEFLIPH", "imagefliph");
undoManager->action(this, ss);
}
flippedH += 1;
imageIsFlippedH = !imageIsFlippedH;
}
 
bool PageItem::imageFlippedV() const
{
return imageIsFlippedV;
}
 
void PageItem::setImageFlippedV(bool flipped)
{
if (flipped != imageIsFlippedV)
flipImageV();
}
 
void PageItem::flipImageV()
{
if (UndoManager::undoEnabled())
2507,7 → 2529,7
ss->set("IMAGEFLIPV", "imageflipv");
undoManager->action(this, ss);
}
flippedV += 1;
imageIsFlippedV = !imageIsFlippedV;
}
 
void PageItem::toggleLock()
/branches/Version13x/Scribus/scribus/scribusview.cpp
633,7 → 633,7
HR->RExtra = b->RExtra;
HR->First = Doc->docParagraphStyles[Doc->currentParaStyle].First;
HR->Indent = Doc->docParagraphStyles[Doc->currentParaStyle].Indent;
if ((b->flippedH % 2 != 0) || (b->Reverse))
if (b->imageFlippedH() || (b->Reverse))
HR->Revers = true;
else
HR->Revers = false;
1151,7 → 1151,7
{
if ((b->PType == 6) || (b->PType == 7) || (b->PType == 2) || (b->PType == 8))
{
if ((b->Locked) || (!b->ScaleType))
if ((b->locked()) || (!b->ScaleType))
{
contentsMousePressEvent(m);
return;
1467,7 → 1467,6
}
if ((!GetItem(&b)) && (m->button() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode))
{
int menid;
QPopupMenu *pmen = new QPopupMenu();
if (ScApp->Buffer2.startsWith("<SCRIBUSELEM"))
{
1640,11 → 1639,11
}
if (b->PType == 8)
pmen->insertItem( tr("Edit Text..."), this, SIGNAL(EditText()));
if (!b->Locked)
if (!b->locked())
pmen->insertItem( tr("&Lock"), this, SLOT(ToggleLock()));
else
pmen->insertItem( tr("Un&lock"), this, SLOT(ToggleLock()));
if (!b->LockRes)
if (!b->sizeLocked())
pmen->insertItem( tr("Lock Object &Size"), this, SLOT(ToggleResize()));
else
pmen->insertItem( tr("Unlock Object &Size"), this, SLOT(ToggleResize()));
1665,7 → 1664,7
}
if (b->PType == 4)
pmen->insertItem( tr("&Insert Sample Text"), this, SLOT(LoremIpsum()));
if (!b->Locked)
if (!b->locked())
{
if (SelItem.count() > 1)
{
1723,13 → 1722,13
pmen->insertItem( tr("Conve&rt to"), pmen2);
}
pmen->insertSeparator();
if (!b->Locked && !(b->isTableItem && b->isSingleSel))
if (!b->locked() && !(b->isTableItem && b->isSingleSel))
ScApp->scrActions["editCut"]->addTo(pmen);
if (!(b->isTableItem && b->isSingleSel))
ScApp->scrActions["editCopy"]->addTo(pmen);
if ((Doc->appMode == EditMode) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (b->PType == 4))
ScApp->scrActions["editPaste"]->addTo(pmen);
if (!b->Locked && (Doc->appMode != 7) && (!(b->isTableItem && b->isSingleSel)))
if (!b->locked() && (Doc->appMode != 7) && (!(b->isTableItem && b->isSingleSel)))
pmen->insertItem( tr("&Delete"), this, SLOT(DeleteItem()));
if ((b->PType == 2) || (b->PType == 4))
pmen->insertItem( tr("C&lear Contents"), this, SLOT(ClearItem()));
1974,9 → 1973,9
if (bb != b)
MoveSizeItem(FPoint(0, 0), FPoint(-dist, 0), bb->ItemNr);
}
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
}
else
2058,9 → 2057,9
else
MoveSizeItem(npx, npx, b->ItemNr);
b->Sizing = false;
if (b->flippedH % 2 == 0)
if (!b->imageFlippedH())
MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr);
if (b->flippedV % 2 == 0)
if (!b->imageFlippedV())
MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr);
}
else
2147,9 → 2146,9
else
MoveSizeItem(FPoint(0, npx.y()), FPoint(b->Width - npx.x(), npx.y()), b->ItemNr);
b->Sizing = false;
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 == 0)
if (!b->imageFlippedV())
MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
break;
case 4:
2207,9 → 2206,9
else
MoveSizeItem(FPoint(npx.x(), 0), FPoint(npx.x(), b->Height - npx.y()), b->ItemNr);
b->Sizing = false;
if (b->flippedH % 2 == 0)
if (!b->imageFlippedH())
MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
break;
case 5:
2243,7 → 2242,7
}
else
MoveSizeItem(FPoint(0, 0), FPoint(0, b->Height - npx.y()), b->ItemNr);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
b->Sizing = false;
break;
2278,7 → 2277,7
}
else
MoveSizeItem(FPoint(0, 0), FPoint(b->Width - npx.x(), 0), b->ItemNr);
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
b->Sizing = false;
break;
2313,9 → 2312,9
else
MoveSizeItem(FPoint(npx.x(), 0), FPoint(npx.x(), 0), b->ItemNr);
b->Sizing = false;
if (b->flippedH % 2 == 0)
if (!b->imageFlippedH())
MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
break;
case 8:
2349,9 → 2348,9
else
MoveSizeItem(FPoint(0, npx.y()), FPoint(0, npx.y()), b->ItemNr);
b->Sizing = false;
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 == 0)
if (!b->imageFlippedV())
MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
break;
}
2827,7 → 2826,7
{
newX = static_cast<int>(m->x()/sc);
newY = static_cast<int>(m->y()/sc);
if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode) && (!b->Locked) && (!(b->isTableItem && b->isSingleSel)))
if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode) && (!b->locked()) && (!(b->isTableItem && b->isSingleSel)))
{
if ((abs(Dxp - newX) > 10) || (abs(Dyp - newY) > 10))
{
2991,7 → 2990,7
emit b->HasSel ? HasTextSel() : HasNoTextSel();
}
}
if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == NormalMode) || ((Doc->appMode == EditMode) && HanMove)) && (!b->Locked))
if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == NormalMode) || ((Doc->appMode == EditMode) && HanMove)) && (!b->locked()))
{
if (Doc->EditClip)
{
3432,7 → 3431,7
for (a = 0; a < SelItem.count(); ++a)
{
b = SelItem.at(a);
if (b->Locked)
if (b->locked())
break;
p.begin(viewport());
Transform(b, &p);
3495,7 → 3494,7
if (QRegion(p.xForm(QPointArray(QRect(-3, -3, static_cast<int>(b->Width+6), static_cast<int>(b->Height+6))))).contains(mpo))
{
tx = p.xForm(QRect(0, 0, static_cast<int>(b->Width), static_cast<int>(b->Height)));
if ((tx.intersects(mpo)) && (!b->Locked))
if ((tx.intersects(mpo)) && (!b->locked()))
{
qApp->setOverrideCursor(QCursor(SizeAllCursor), true);
if (Doc->appMode == Rotation)
3507,7 → 3506,7
if (b->PType == 2)
qApp->setOverrideCursor(QCursor(loadIcon("HandC.xpm")), true);
}
if (!b->LockRes)
if (!b->sizeLocked())
HandleCurs(&p, b, mpo);
}
else
3933,7 → 3932,7
break;
}
}
if (b->LockRes)
if (b->sizeLocked())
{
qApp->setOverrideCursor(QCursor(SizeAllCursor), true);
HowTo = 0;
3952,7 → 3951,7
b = SelItem.at(0);
p.begin(viewport());
Transform(b, &p);
if (!b->Locked)
if (!b->locked())
{
HandleSizer(&p, b, mpo, m);
if (HowTo != 0)
4037,7 → 4036,7
slotDoCurs(false);
if (GetItem(&b))
{
if (!b->Locked)
if (!b->locked())
{
p.begin(viewport());
Transform(b, &p);
4736,7 → 4735,7
 
bool ScribusView::MoveItem(double newX, double newY, PageItem* b, bool fromMP)
{
if (b->Locked)
if (b->locked())
return false;
bool retw = false;
double oldx = b->Xpos;
4778,13 → 4777,13
void ScribusView::MoveItemI(double newX, double newY, int ite, bool redraw)
{
PageItem *b = Doc->Items.at(ite);
if ((b->Locked) || (!b->ScaleType))
if ((b->locked()) || (!b->ScaleType))
return;
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
b->LocalX -= newX;
else
b->LocalX += newX;
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
b->LocalY -= newY;
else
b->LocalY += newY;
5390,7 → 5389,7
else
MoveItem(np.x(), 0, b);
Clip.translate(-np.x(), 0);
if (b->flippedH % 2 == 0)
if (!b->imageFlippedH())
MoveItemI(-np.x()/b->LocalScX, 0, b->ItemNr, false);
np.setX(0);
}
5405,7 → 5404,7
else
MoveItem(0, np.y(), b);
Clip.translate(0, -np.y());
if (b->flippedV % 2 == 0)
if (!b->imageFlippedV())
MoveItemI(0, -np.y()/b->LocalScY, b->ItemNr, false);
np.setY(0);
}
5517,7 → 5516,7
bool ScribusView::SizeItem(double newX, double newY, PageItem *pi, bool fromMP, bool DoUpdateClip, bool redraw)
{
PageItem *b = pi;
if (b->Locked)
if (b->locked())
return false;
QPainter p;
QRect oldR = getRedrawBounding(b);
5603,16 → 5602,16
{
if (fromMP)
{
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
}
else
{
if (b->flippedH % 2 == 0)
if (!b->imageFlippedH())
MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 == 0)
if (!b->imageFlippedV())
MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false);
}
UpdateClip(b);
5823,7 → 5822,7
for (uint a = 0; a < SelItem.count(); ++a)
{
bb = SelItem.at(a);
if ((bb->Locked) || (bb->LockRes))
if ((bb->locked()) || (bb->sizeLocked()))
continue;
bb->OldB = bb->Width;
bb->OldH = bb->Height;
5927,7 → 5926,7
{
PageItem *b;
b = pi;
if (b->Locked)
if (b->locked())
return;
FPoint n;
QRect oldR = getRedrawBounding(b);
5992,14 → 5991,14
}
else
MoveItem(tp2.x(), tp2.y(), b, true);
if (b->flippedH % 2 == 0)
if (!b->imageFlippedH())
MoveItemI(-tp2.x()/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 == 0)
if (!b->imageFlippedV())
MoveItemI(0, -tp2.y()/b->LocalScY, b->ItemNr, false);
FPoint tp = getMaxClipF(&Clip);
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
MoveItemI((b->Width - tp.x())/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
MoveItemI(0, (b->Height - tp.y())/b->LocalScY, b->ItemNr, false);
SizeItem(tp.x(), tp.y(), b->ItemNr, true, false);
b->ClipEdited = true;
7096,7 → 7095,7
b->OldB2 = b->Width;
b->OldH2 = b->Height;
HowTo = 0;
if (b->LockRes)
if (b->sizeLocked())
return;
QRect ne = QRect();
PaintSizeRect(p, ne);
7317,12 → 7316,12
PageItem *b = Doc->Items.at(a);
if ((b->PicAvail) && (b->Pfile == name))
{
int fho = b->flippedH;
int fvo = b->flippedV;
bool fho = b->imageFlippedH();
bool fvo = b->imageFlippedV();
b->pixmOrg = QImage();
LoadPict(b->Pfile, b->ItemNr, true);
b->flippedH = fho;
b->flippedV = fvo;
b->setImageFlippedH(fho);
b->setImageFlippedV(fvo);
AdjustPictScale(b);
AdjustPreview(b, false);
}
7332,12 → 7331,12
PageItem *b = Doc->MasterItems.at(a);
if ((b->PicAvail) && (b->Pfile == name))
{
int fho = b->flippedH;
int fvo = b->flippedV;
bool fho = b->imageFlippedH();
bool fvo = b->imageFlippedV();
b->pixmOrg = QImage();
LoadPict(b->Pfile, b->ItemNr, true);
b->flippedH = fho;
b->flippedV = fvo;
b->setImageFlippedH(fho);
b->setImageFlippedV(fvo);
AdjustPictScale(b);
AdjustPreview(b, false);
}
7381,12 → 7380,12
PageItem *b = SelItem.at(0);
if (b->PicAvail)
{
int fho = b->flippedH;
int fvo = b->flippedV;
int fho = b->imageFlippedH();
int fvo = b->imageFlippedV();
b->pixmOrg = QImage();
LoadPict(b->Pfile, b->ItemNr, true);
b->flippedH = fho;
b->flippedV = fvo;
b->setImageFlippedH(fho);
b->setImageFlippedV(fvo);
AdjustPictScale(b);
AdjustPreview(b, false);
updateContents();
7473,7 → 7472,7
{
if (SelItem.count() > 1)
{
if (SelItem.at(0)->Locked)
if (SelItem.at(0)->locked())
undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::UnLock, 0, Um::IUnLock);
else
7498,7 → 7497,7
{
if (SelItem.count() > 1)
{
if (SelItem.at(0)->LockRes)
if (SelItem.at(0)->sizeLocked())
undoManager->beginTransaction(Um::SelectionGroup,
Um::IGroup, Um::SizeUnLock, 0, Um::IUnLock);
else
7882,8 → 7881,8
b->dpiY = 72.0;
b->LocalX = 0;
b->LocalY = 0;
b->flippedH = 0;
b->flippedV = 0;
b->setImageFlippedH(false);
b->setImageFlippedV(false);
b->textAlignment = 0;
b->EmProfile = "";
b->ScaleType = true;
7912,7 → 7911,7
for (uint de = 0; de < anz; ++de)
{
b = SelItem.at(offs);
if ((b->isTableItem && b->isSingleSel) || (b->Locked))
if ((b->isTableItem && b->isSingleSel) || (b->locked()))
{
offs++;
continue;
8900,12 → 8899,12
 
void ScribusView::TransformM(PageItem *b, QPainter *p)
{
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
{
p->translate(b->Width, 0);
p->scale(-1, 1);
}
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
{
p->translate(0, b->Height);
p->scale(1, -1);
10443,8 → 10442,8
Item->PicArt = false;
}
}
Item->flippedH = 0;
Item->flippedV = 0;
Item->setImageFlippedH(false);
Item->setImageFlippedV(false);
if (!Doc->loading)
{
emit RasterPic(Item->isRaster);
10455,8 → 10454,8
 
void ScribusView::AdjustPreview(PageItem *b, bool reload)
{
int neww, newh, fho, fvo;
bool savF;
int neww, newh;
bool savF, fho, fvo;
if ((b->LocalViewX < 1.0) || (b->LocalViewY < 1.0))
{
if ((b->Pfile != "") && (b->PicAvail))
10463,8 → 10462,8
{
if (!b->Sizing)
{
fho = b->flippedH;
fvo = b->flippedV;
fho = b->imageFlippedH();
fvo = b->imageFlippedV();
savF = b->PicArt;
if ( !b->pixmOrg.isNull() )
{
10483,8 → 10482,8
}
else
LoadPict(b->Pfile, b->ItemNr, true);
b->flippedH = fho;
b->flippedV = fvo;
b->setImageFlippedH(fho);
b->setImageFlippedV(fvo);
b->PicArt = savF;
}
neww = qRound(b->pixm.width() * b->LocalViewX);
10509,7 → 10508,8
double ys = b->Height / static_cast<double>(b->OrigH);
if (!b->Sizing)
{
int fho = b->flippedH, fvo = b->flippedV;
bool fho = b->imageFlippedH();
bool fvo = b->imageFlippedV();
savF = b->PicArt;
if (!b->pixmOrg.isNull())
{
10528,8 → 10528,8
}
else // jjsa end
LoadPict(b->Pfile, b->ItemNr, true);
b->flippedH = fho;
b->flippedV = fvo;
b->setImageFlippedH(fho);
b->setImageFlippedV(fvo);
b->PicArt = savF;
}
if (b->AspectRatio)
10679,8 → 10679,8
break;
}
PageItem* b = Doc->Items.at(z);
b->flippedH = Buffer->flippedH;
b->flippedV = Buffer->flippedV;
b->setImageFlippedH(Buffer->flippedH);
b->setImageFlippedV(Buffer->flippedV);
b->RadRect = Buffer->RadRect;
b->FrameType = Buffer->FrameType;
b->ClipEdited = Buffer->ClipEdited;
10793,8 → 10793,8
b->TabValues = Buffer->TabValues;
b->DashValues = Buffer->DashValues;
b->DashOffset = Buffer->DashOffset;
b->Locked = Buffer->Locked;
b->LockRes = Buffer->LockRes;
b->setLocked(Buffer->Locked);
b->setSizeLocked(Buffer->LockRes);
b->Transparency = Buffer->Transparency;
b->TranspStroke = Buffer->TranspStroke;
b->Reverse = Buffer->Reverse;
11253,9 → 11253,9
chma.scale(b->itemText.at(a)->cscale / 100.0, 1);
pts.map(chma);
chma = QWMatrix();
if ((b->flippedH % 2 != 0) && (!b->Reverse))
if (b->imageFlippedH() && (!b->Reverse))
chma.scale(-1, 1);
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
chma.scale(1, -1);
pts.map(chma);
uint z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->Pcolor2, b->Pcolor);
11262,8 → 11262,8
bb = Doc->Items.at(z);
bb->Textflow = b->Textflow;
bb->Textflow2 = b->Textflow2;
bb->LockRes = b->LockRes;
bb->Locked = b->Locked;
bb->setSizeLocked(b->sizeLocked());
bb->setLocked(b->locked());
bb->NamedLStyle = b->NamedLStyle;
bb->setItemName(b->itemName()+"+"+ccounter.setNum(a));
bb->AutoName = false;
11296,9 → 11296,9
wide = Cwidth(Doc, b->itemText.at(a)->cfont, chx, b->itemText.at(a)->csize, b->itemText.at(a+1)->ch);
else
wide = Cwidth(Doc, b->itemText.at(a)->cfont, chx, b->itemText.at(a)->csize);
if (b->flippedH % 2 != 0)
if (b->imageFlippedH())
textX = b->Width - textX - wide;
if (b->flippedV % 2 != 0)
if (b->imageFlippedV())
textY = b->Height - textY+ y - (bb->Height - y);
npo = transformPoint(FPoint(textX+x, textY-y), 0.0, 0.0, b->Rot, 1.0, 1.0);
bb->Xpos = b->Xpos+npo.x();
/branches/Version13x/Scribus/scribus/libpostscript/pslib.cpp
1166,12 → 1166,12
PS_closepath();
PS_clip(false);
PS_save();
if ((ite->flippedH % 2) != 0)
if (ite->imageFlippedH())
{
PS_translate(ite->Width, 0);
PS_scale(-1, 1);
}
if ((ite->flippedV % 2) != 0)
if (ite->imageFlippedV())
{
PS_translate(0, -ite->Height);
PS_scale(1, -1);
1243,12 → 1243,12
PS_closepath();
PS_fill();
}
if ((ite->flippedH % 2) != 0)
if (ite->imageFlippedH())
{
PS_translate(ite->Width, 0);
PS_scale(-1, 1);
}
if ((ite->flippedV % 2) != 0)
if (ite->imageFlippedV())
{
PS_translate(0, -ite->Height);
PS_scale(1, -1);
1642,12 → 1642,12
SetClipPath(&c->PoLine);
PS_closepath();
PS_clip(true);
if ((c->flippedH % 2) != 0)
if (c->imageFlippedH())
{
PS_translate(c->Width, 0);
PS_scale(-1, 1);
}
if ((c->flippedV % 2) != 0)
if (c->imageFlippedV())
{
PS_translate(0, -c->Height);
PS_scale(1, -1);
1726,12 → 1726,12
else
PS_fill();
}
if ((c->flippedH % 2) != 0)
if (c->imageFlippedH())
{
PS_translate(c->Width, 0);
PS_scale(-1, 1);
}
if ((c->flippedV % 2) != 0)
if (c->imageFlippedV())
{
PS_translate(0, -c->Height);
PS_scale(1, -1);
/branches/Version13x/Scribus/scribus/scribus.cpp
176,8 → 176,9
scrMenuMgr = new MenuManager(this->menuBar());
 
PrefsPfad = getPreferencesLocation();
bool importingFrom12=convert12Preferences(PrefsPfad);
prefsFile = new PrefsFile(QDir::convertSeparators(PrefsPfad + "/prefs13.xml"));
convertToXMLPreferences(PrefsPfad);
 
undoManager = UndoManager::instance();
 
224,7 → 225,7
if (splashScreen != NULL)
splashScreen->setStatus( tr("Reading Preferences"));
qApp->processEvents();
ReadPrefs();
ReadPrefs(importingFrom12);
 
HaveGS = system(Prefs.gs_exe+" -h > /dev/null 2>&1");
HavePngAlpha = system(Prefs.gs_exe+" -sDEVICE=pngalpha -c quit > /dev/null 2>&1");
642,123 → 643,121
//CB TODO Need to rewrite this key management stuff.. these would be much simpler done in the action themselves.
//FILE MENU
SetKeyEntry(0, scrActions["fileNew"]->cleanMenuText(), 0, scrActions["fileNew"]->accel(), "fileNew");
SetKeyEntry(1, scrActions["fileOpen"]->cleanMenuText(), 0, scrActions["fileOpen"]->accel(), "fileOpen");
SetKeyEntry(2, scrActions["fileClose"]->cleanMenuText(), 0, scrActions["fileClose"]->accel(), "fileClose");
SetKeyEntry(3, scrActions["fileSave"]->cleanMenuText(), 0, scrActions["fileSave"]->accel(), "fileSave");
SetKeyEntry(4, scrActions["fileSaveAs"]->cleanMenuText(), 0, scrActions["fileSaveAs"]->accel(), "fileSaveAs");
//SetKeyEntry(, scrActions["fileRevert"]->cleanMenuText(), 0, scrActions["fileRevert"]->accel(), "fileRevert");
//SetKeyEntry(, scrActions["fileCollect"]->cleanMenuText(), 0, scrActions["fileCollect"]->accel(), "fileCollect");
SetKeyEntry(6, scrActions["fileDocSetup"]->cleanMenuText(), 0, scrActions["fileDocSetup"]->accel(), "fileDocSetup");
SetKeyEntry(8, scrActions["fileQuit"]->cleanMenuText(), 0, scrActions["fileQuit"]->accel(), "fileQuit");
uint id=0;
SetKeyEntry("fileNew", scrActions["fileNew"]->cleanMenuText(), QString(scrActions["fileNew"]->accel()));
/*
SetKeyEntry(0, scrActions["fileOpen"]->cleanMenuText(), 0, 0, scrActions["fileOpen"]->accel(), "fileOpen");
SetKeyEntry(0, scrActions["fileClose"]->cleanMenuText(), 0, 0, scrActions["fileClose"]->accel(), "fileClose");
SetKeyEntry(0, scrActions["fileSave"]->cleanMenuText(), 0, 0, scrActions["fileSave"]->accel(), "fileSave");
SetKeyEntry(0, scrActions["fileSaveAs"]->cleanMenuText(), 0, 0, scrActions["fileSaveAs"]->accel(), "fileSaveAs");
//SetKeyEntry(, scrActions["fileRevert"]->cleanMenuText(), 0, 0, scrActions["fileRevert"]->accel(), "fileRevert");
//SetKeyEntry(, scrActions["fileCollect"]->cleanMenuText(), 0, 0, scrActions["fileCollect"]->accel(), "fileCollect");
SetKeyEntry(0, scrActions["fileDocSetup"]->cleanMenuText(), 0, 0, scrActions["fileDocSetup"]->accel(), "fileDocSetup");
SetKeyEntry(0, scrActions["fileQuit"]->cleanMenuText(), 0, 0, scrActions["fileQuit"]->accel(), "fileQuit");
//Included import & export options
//SetKeyEntry(, scrActions["fileImportText"]->cleanMenuText(), 0, scrActions["fileImportText"]->accel(), "fileImportText");
//SetKeyEntry(, scrActions["fileImportAppendText"]->cleanMenuText(), 0, scrActions["fileImportAppendText"]->accel(), "fileImportAppendText");
//SetKeyEntry(, scrActions["fileImportImage"]->cleanMenuText(), 0, scrActions["fileImportImage"]->accel(), "fileImportImage");
//SetKeyEntry(, scrActions["fileImportPage"]->cleanMenuText(), 0, scrActions["fileImportPage"]->accel(), "fileImportPage");
//SetKeyEntry(, scrActions["fileExportText"]->cleanMenuText(), 0, scrActions["fileExportText"]->accel(), "fileExportText");
//SetKeyEntry(, scrActions["fileExportAsEPS"]->cleanMenuText(), 0, scrActions["fileExportAsEPS"]->accel(), "fileExportAsEPS");
//SetKeyEntry(, scrActions["fileExportAsPDF"]->cleanMenuText(), 0, scrActions["fileExportAsPDF"]->accel(), "fileExportAsPDF");
//SetKeyEntry(, scrActions["fileImportText"]->cleanMenuText(), 0, 0, scrActions["fileImportText"]->accel(), "fileImportText");
//SetKeyEntry(, scrActions["fileImportAppendText"]->cleanMenuText(), 0, 0, scrActions["fileImportAppendText"]->accel(), "fileImportAppendText");
//SetKeyEntry(, scrActions["fileImportImage"]->cleanMenuText(), 0, 0, scrActions["fileImportImage"]->accel(), "fileImportImage");
//SetKeyEntry(, scrActions["fileImportPage"]->cleanMenuText(), 0, 0, scrActions["fileImportPage"]->accel(), "fileImportPage");
//SetKeyEntry(, scrActions["fileExportText"]->cleanMenuText(), 0, 0, scrActions["fileExportText"]->accel(), "fileExportText");
//SetKeyEntry(, scrActions["fileExportAsEPS"]->cleanMenuText(), 0, 0, scrActions["fileExportAsEPS"]->accel(), "fileExportAsEPS");
//SetKeyEntry(, scrActions["fileExportAsPDF"]->cleanMenuText(), 0, 0, scrActions["fileExportAsPDF"]->accel(), "fileExportAsPDF");
//EDIT MENU
SetKeyEntry(9, scrActions["editCut"]->cleanMenuText(), 0, scrActions["editCut"]->accel(), "editCut");
SetKeyEntry(10, scrActions["editCopy"]->cleanMenuText(), 0, scrActions["editCopy"]->accel(), "editCopy");
SetKeyEntry(11, scrActions["editPaste"]->cleanMenuText(), 0, scrActions["editPaste"]->accel(), "editPaste");
SetKeyEntry(12, scrActions["editClear"]->cleanMenuText(), 0, scrActions["editClear"]->accel(), "editClear");
SetKeyEntry(13, scrActions["editSelectAll"]->cleanMenuText(), 0, scrActions["editSelectAll"]->accel(), "editSelectAll");
SetKeyEntry(14, scrActions["editColors"]->cleanMenuText(), 0, scrActions["editColors"]->accel(), "editColors");
SetKeyEntry(15, scrActions["editParaStyles"]->cleanMenuText(), 0, scrActions["editParaStyles"]->accel(), "editParaStyles");
SetKeyEntry(16, scrActions["editTemplates"]->cleanMenuText(), 0, scrActions["editTemplates"]->accel(), "editTemplates");
//SetKeyEntry(, scrActions["editSearchReplace"]->cleanMenuText(), 0, scrActions["editSearchReplace"]->accel(), "editSearchReplace");
//SetKeyEntry(, scrActions["editLineStyles"]->cleanMenuText(), 0, scrActions["editLineStyles"]->accel(), "editLineStyles");
SetKeyEntry(0, scrActions["editCut"]->cleanMenuText(), 0, 0, scrActions["editCut"]->accel(), "editCut");
SetKeyEntry(0, scrActions["editCopy"]->cleanMenuText(), 0, 0, scrActions["editCopy"]->accel(), "editCopy");
SetKeyEntry(0, scrActions["editPaste"]->cleanMenuText(), 0, 0, scrActions["editPaste"]->accel(), "editPaste");
SetKeyEntry(0, scrActions["editClear"]->cleanMenuText(), 0, 0, scrActions["editClear"]->accel(), "editClear");
SetKeyEntry(0, scrActions["editSelectAll"]->cleanMenuText(), 0, 0, scrActions["editSelectAll"]->accel(), "editSelectAll");
SetKeyEntry(0, scrActions["editColors"]->cleanMenuText(), 0, 0, scrActions["editColors"]->accel(), "editColors");
SetKeyEntry(0, scrActions["editParaStyles"]->cleanMenuText(), 0, 0, scrActions["editParaStyles"]->accel(), "editParaStyles");
SetKeyEntry(0, scrActions["editTemplates"]->cleanMenuText(), 0, 0, scrActions["editTemplates"]->accel(), "editTemplates");
//SetKeyEntry(, scrActions["editSearchReplace"]->cleanMenuText(), 0, 0, scrActions["editSearchReplace"]->accel(), "editSearchReplace");
//SetKeyEntry(, scrActions["editLineStyles"]->cleanMenuText(), 0, 0, scrActions["editLineStyles"]->accel(), "editLineStyles");
//SetKeyEntry(, scrActions["editFonts"]->cleanMenuText(), 0, scrActions["editFonts"]->accel(), "editFonts");
SetKeyEntry(19, tr("Select New Font"), 0, 0);
//SetKeyEntry(, scrActions["editFonts"]->cleanMenuText(), 0, 0, scrActions["editFonts"]->accel(), "editFonts");
//SetKeyEntry(19, tr("Select New Font"), 0, 0);
//ITEM MENU
SetKeyEntry(20, scrActions["itemDuplicate"]->cleanMenuText(), 0, scrActions["itemDuplicate"]->accel(), "itemDuplicate");
SetKeyEntry(21, scrActions["itemMulDuplicate"]->cleanMenuText(), 0, scrActions["itemMulDuplicate"]->accel(), "itemMulDuplicate");
SetKeyEntry(22, scrActions["itemDelete"]->cleanMenuText(), 0, scrActions["itemDelete"]->accel(), "itemDelete");
SetKeyEntry(23, scrActions["itemGroup"]->cleanMenuText(), 0, scrActions["itemGroup"]->accel(), "itemGroup");
SetKeyEntry(24, scrActions["itemUngroup"]->cleanMenuText(), 0, scrActions["itemUngroup"]->accel(), "itemUngroup");
SetKeyEntry(25, scrActions["itemSendToBack"]->cleanMenuText(), 0, scrActions["itemSendToBack"]->accel(), "itemSendToBack");
SetKeyEntry(26, scrActions["itemBringToFront"]->cleanMenuText(), 0, scrActions["itemBringToFront"]->accel(), "itemBringToFront");
SetKeyEntry(27, scrActions["itemLower"]->cleanMenuText(), 0, scrActions["itemLower"]->accel(), "itemLower");
SetKeyEntry(28, scrActions["itemRaise"]->cleanMenuText(), 0, scrActions["itemRaise"]->accel(), "itemRaise");
SetKeyEntry(29, scrActions["itemAlignDist"]->cleanMenuText(), 0, scrActions["itemAlignDist"]->accel(), "itemAlignDist");
SetKeyEntry(67, scrActions["itemLock"]->cleanMenuText(), 0, scrActions["itemLock"]->accel(), "itemLock");
SetKeyEntry(0, scrActions["itemDuplicate"]->cleanMenuText(), 0, 0, scrActions["itemDuplicate"]->accel(), "itemDuplicate");
SetKeyEntry(0, scrActions["itemMulDuplicate"]->cleanMenuText(), 0, 0, scrActions["itemMulDuplicate"]->accel(), "itemMulDuplicate");
SetKeyEntry(0, scrActions["itemDelete"]->cleanMenuText(), 0, 0, scrActions["itemDelete"]->accel(), "itemDelete");
SetKeyEntry(0, scrActions["itemGroup"]->cleanMenuText(), 0, 0, scrActions["itemGroup"]->accel(), "itemGroup");
SetKeyEntry(0, scrActions["itemUngroup"]->cleanMenuText(), 0, 0, scrActions["itemUngroup"]->accel(), "itemUngroup");
SetKeyEntry(0, scrActions["itemSendToBack"]->cleanMenuText(), 0, 0, scrActions["itemSendToBack"]->accel(), "itemSendToBack");
SetKeyEntry(0, scrActions["itemBringToFront"]->cleanMenuText(), 0, 0, scrActions["itemBringToFront"]->accel(), "itemBringToFront");
SetKeyEntry(0, scrActions["itemLower"]->cleanMenuText(), 0, 0, scrActions["itemLower"]->accel(), "itemLower");
SetKeyEntry(0, scrActions["itemRaise"]->cleanMenuText(), 0, 0, scrActions["itemRaise"]->accel(), "itemRaise");
SetKeyEntry(0, scrActions["itemAlignDist"]->cleanMenuText(), 0, 0, scrActions["itemAlignDist"]->accel(), "itemAlignDist");
SetKeyEntry(0, scrActions["itemLock"]->cleanMenuText(), 0, 0, scrActions["itemLock"]->accel(), "itemLock");
 
//SetKeyEntry(, scrActions["itemShapeEdit"]->cleanMenuText(), 0, scrActions["itemShapeEdit"]->accel(), "itemShapeEdit");
//SetKeyEntry(, scrActions["itemShapeEdit"]->cleanMenuText(), 0, 0, scrActions["itemShapeEdit"]->accel(), "itemShapeEdit");
//CBSetKeyEntry(61, tr("Attach Text to Path"), M_ItemAttachTextToPath, 0);
//SetKeyEntry(, scrActions["itemAttachTextToPath"]->cleanMenuText(), 0, scrActions["itemAttachTextToPath"]->accel(), "itemAttachTextToPath");
//SetKeyEntry(, scrActions["itemDetachTextFromPath"]->cleanMenuText(), 0, scrActions["itemDetachTextFromPath"]->accel(), "itemDetachTextFromPath");
//SetKeyEntry(, scrActions["itemCombinePolygons"]->cleanMenuText(), 0, scrActions["itemCombinePolygons"]->accel(), "itemCombinePolygons");
//SetKeyEntry(, scrActions["itemSplitPolygons"]->cleanMenuText(), 0, scrActions["itemSplitPolygons"]->accel(), "itemSplitPolygons");
//SetKeyEntry(, scrActions["itemConvertToOutlines"]->cleanMenuText(), 0, scrActions["itemConvertToOutlines"]->accel(), "itemConvertToOutlines");
//SetKeyEntry(, scrActions["itemAttachTextToPath"]->cleanMenuText(), 0, 0, scrActions["itemAttachTextToPath"]->accel(), "itemAttachTextToPath");
//SetKeyEntry(, scrActions["itemDetachTextFromPath"]->cleanMenuText(), 0, 0, scrActions["itemDetachTextFromPath"]->accel(), "itemDetachTextFromPath");
//SetKeyEntry(, scrActions["itemCombinePolygons"]->cleanMenuText(), 0, 0, scrActions["itemCombinePolygons"]->accel(), "itemCombinePolygons");
//SetKeyEntry(, scrActions["itemSplitPolygons"]->cleanMenuText(), 0, 0, scrActions["itemSplitPolygons"]->accel(), "itemSplitPolygons");
//SetKeyEntry(, scrActions["itemConvertToOutlines"]->cleanMenuText(), 0, 0, scrActions["itemConvertToOutlines"]->accel(), "itemConvertToOutlines");
//PAGE MENU
SetKeyEntry(30, scrActions["pageInsert"]->cleanMenuText(), 0, scrActions["pageInsert"]->accel(), "pageInsert");
SetKeyEntry(31, scrActions["pageDelete"]->cleanMenuText(), 0, scrActions["pageDelete"]->accel(), "pageDelete");
SetKeyEntry(32, scrActions["pageMove"]->cleanMenuText(), 0, scrActions["pageMove"]->accel(), "pageMove");
SetKeyEntry(33, scrActions["pageApplyTemplate"]->cleanMenuText(), 0, scrActions["pageApplyTemplate"]->accel(), "pageApplyTemplate");
SetKeyEntry(49, scrActions["pageManageGuides"]->cleanMenuText(), 0, scrActions["pageManageGuides"]->accel(), "pageManageGuides");
SetKeyEntry(61, scrActions["pageCopy"]->cleanMenuText(), 0, scrActions["pageCopy"]->accel(), "pageCopy");
SetKeyEntry(0, scrActions["pageInsert"]->cleanMenuText(), 0, 0, scrActions["pageInsert"]->accel(), "pageInsert");
SetKeyEntry(0, scrActions["pageDelete"]->cleanMenuText(), 0, 0, scrActions["pageDelete"]->accel(), "pageDelete");
SetKeyEntry(0, scrActions["pageMove"]->cleanMenuText(), 0, 0, scrActions["pageMove"]->accel(), "pageMove");
SetKeyEntry(0, scrActions["pageApplyTemplate"]->cleanMenuText(), 0, 0, scrActions["pageApplyTemplate"]->accel(), "pageApplyTemplate");
SetKeyEntry(0, scrActions["pageManageGuides"]->cleanMenuText(), 0, 0, scrActions["pageManageGuides"]->accel(), "pageManageGuides");
SetKeyEntry(0, scrActions["pageCopy"]->cleanMenuText(), 0, 0, scrActions["pageCopy"]->accel(), "pageCopy");
//VIEW MENU
SetKeyEntry(34, scrActions["viewFitInWindow"]->cleanMenuText(), 0, scrActions["viewFitInWindow"]->accel(), "viewFitInWindow");
SetKeyEntry(35, scrActions["viewFit50"]->cleanMenuText(), 0, scrActions["viewFit50"]->accel(), "viewFit50");
SetKeyEntry(36, scrActions["viewFit75"]->cleanMenuText(), 0, scrActions["viewFit75"]->accel(), "viewFit75");
SetKeyEntry(37, scrActions["viewFit100"]->cleanMenuText(), 0, scrActions["viewFit100"]->accel(), "viewFit100");
SetKeyEntry(38, scrActions["viewFit200"]->cleanMenuText(), 0, scrActions["viewFit200"]->accel(), "viewFit200");
SetKeyEntry(39, scrActions["viewFit20"]->cleanMenuText(), 0, scrActions["viewFit20"]->accel(), "viewFit20");
SetKeyEntry(40, scrActions["viewShowMargins"]->cleanMenuText(), 0, scrActions["viewShowMargins"]->accel(), "viewShowMargins");
SetKeyEntry(41, scrActions["viewShowFrames"]->cleanMenuText(), 0, scrActions["viewShowFrames"]->accel(), "viewShowFrames");
SetKeyEntry(42, scrActions["viewShowImages"]->cleanMenuText(), 0, scrActions["viewShowImages"]->accel(), "viewShowImages");
SetKeyEntry(43, scrActions["viewShowGrid"]->cleanMenuText(), 0, scrActions["viewShowGrid"]->accel(), "viewShowGrid");
SetKeyEntry(44, scrActions["viewSnapToGrid"]->cleanMenuText(), 0, scrActions["viewSnapToGrid"]->accel(), "viewSnapToGrid");
SetKeyEntry(0, scrActions["viewFitInWindow"]->cleanMenuText(), 0, 0, scrActions["viewFitInWindow"]->accel(), "viewFitInWindow");
SetKeyEntry(0, scrActions["viewFit50"]->cleanMenuText(), 0, 0, scrActions["viewFit50"]->accel(), "viewFit50");
SetKeyEntry(0, scrActions["viewFit75"]->cleanMenuText(), 0, 0, scrActions["viewFit75"]->accel(), "viewFit75");
SetKeyEntry(0, scrActions["viewFit100"]->cleanMenuText(), 0, 0, scrActions["viewFit100"]->accel(), "viewFit100");
SetKeyEntry(0, scrActions["viewFit200"]->cleanMenuText(), 0, 0, scrActions["viewFit200"]->accel(), "viewFit200");
SetKeyEntry(0, scrActions["viewFit20"]->cleanMenuText(), 0, 0, scrActions["viewFit20"]->accel(), "viewFit20");
SetKeyEntry(0, scrActions["viewShowMargins"]->cleanMenuText(), 0, 0, scrActions["viewShowMargins"]->accel(), "viewShowMargins");
SetKeyEntry(0, scrActions["viewShowFrames"]->cleanMenuText(), 0, 0, scrActions["viewShowFrames"]->accel(), "viewShowFrames");
SetKeyEntry(0, scrActions["viewShowImages"]->cleanMenuText(), 0, 0, scrActions["viewShowImages"]->accel(), "viewShowImages");
SetKeyEntry(0, scrActions["viewShowGrid"]->cleanMenuText(), 0, 0, scrActions["viewShowGrid"]->accel(), "viewShowGrid");
SetKeyEntry(0, scrActions["viewSnapToGrid"]->cleanMenuText(), 0, 0, scrActions["viewSnapToGrid"]->accel(), "viewSnapToGrid");
//TOOLS MENU
SetKeyEntry(46, scrActions["toolsProperties"]->cleanMenuText(), 0, scrActions["toolsProperties"]->accel(), "toolsProperties");
SetKeyEntry(47, scrActions["toolsOutline"]->cleanMenuText(), 0, scrActions["toolsOutline"]->accel(), "toolsOutline");
SetKeyEntry(48, scrActions["toolsScrapbook"]->cleanMenuText(), 0, scrActions["toolsScrapbook"]->accel(), "toolsScrapbook");
SetKeyEntry(45, scrActions["toolsToolbarTools"]->cleanMenuText(), 0, scrActions["toolsToolbarTools"]->accel(), "toolsToolbarTools");
SetKeyEntry(0, scrActions["toolsProperties"]->cleanMenuText(), 0, 0, scrActions["toolsProperties"]->accel(), "toolsProperties");
SetKeyEntry(0, scrActions["toolsOutline"]->cleanMenuText(), 0, 0, scrActions["toolsOutline"]->accel(), "toolsOutline");
SetKeyEntry(0, scrActions["toolsScrapbook"]->cleanMenuText(), 0, 0, scrActions["toolsScrapbook"]->accel(), "toolsScrapbook");
SetKeyEntry(0, scrActions["toolsToolbarTools"]->cleanMenuText(), 0, 0, scrActions["toolsToolbarTools"]->accel(), "toolsToolbarTools");
 
SetKeyEntry(46, tr("Properties"), viewMpal, 0);
SetKeyEntry(47, tr("Outline"), viewTpal, 0);
SetKeyEntry(48, tr("Scrapbook"), viewBpal, 0);
SetKeyEntry(45, tr("Tools"), toolbarMenuTools, 0);
//SetKeyEntry(55, tr("Tooltips"), tip, 0);
//EXTRAS MENU
SetKeyEntry(51, scrActions["extrasManagePictures"]->cleanMenuText(), 0, scrActions["extrasManagePictures"]->accel(), "extrasManagePictures");
SetKeyEntry(50, scrActions["extrasHyphenateText"]->cleanMenuText(), 0, scrActions["extrasHyphenateText"]->accel(), "extrasHyphenateText");
SetKeyEntry(0, scrActions["extrasManagePictures"]->cleanMenuText(), 0, 0, scrActions["extrasManagePictures"]->accel(), "extrasManagePictures");
SetKeyEntry(0, scrActions["extrasHyphenateText"]->cleanMenuText(), 0, 0, scrActions["extrasHyphenateText"]->accel(), "extrasHyphenateText");
//HELP MENU
/*
SetKeyEntry(52, tr("About Scribus"), MenID, 0);
SetKeyEntry(53, tr("About Qt"), MenID, 0);
SetKeyEntry(54, tr("Online-Help..."), MenID, 0);
*/
SetKeyEntry(0, scrActions["helpAboutScribus"]->cleanMenuText(), 0, 0, scrActions["helpAboutScribus"]->accel(), "helpAboutScribus");
SetKeyEntry(0, scrActions["helpAboutQt"]->cleanMenuText(), 0, 0, scrActions["helpAboutQt"]->accel(), "helpAboutQt");
SetKeyEntry(0, scrActions["helpManual"]->cleanMenuText(), 0, 0, scrActions["helpManual"]->accel(), "helpManual");
//EXTRAS
SetKeyEntry(56, tr("Smart Hyphen"), 0, CTRL+Key_Minus);
SetKeyEntry(57, tr("Align Left"), 0, CTRL+Key_L);
SetKeyEntry(58, tr("Align Right"), 0, CTRL+Key_R);
SetKeyEntry(59, tr("Align Center"), 0, CTRL+Key_E);
SetKeyEntry(60, tr("Insert Page Number"), 0, CTRL+Key_NumberSign);
//SetKeyEntry(56, tr("Smart Hyphen"), 0, CTRL+Key_Minus);
SetKeyEntry(0, scrActions["alignLeft"]->cleanMenuText(), 0, 0, scrActions["alignLeft"]->accel(), "alignLeft");
SetKeyEntry(0, scrActions["alignRight"]->cleanMenuText(), 0, 0, scrActions["alignRight"]->accel(), "alignRight");
SetKeyEntry(0, scrActions["alignCenter"]->cleanMenuText(), 0, 0, scrActions["alignCenter"]->accel(), "alignCenter");
//SetKeyEntry(60, tr("Insert Page Number"), 0, CTRL+Key_NumberSign);
 
SetKeyEntry(62, tr("Show Layers"), viewLpal, 0);
SetKeyEntry(0, scrActions["toolsLayers"]->cleanMenuText(), 0, 0, scrActions["toolsLayers"]->accel(), "toolsLayers");
SetKeyEntry(63, scrActions["editJavascripts"]->cleanMenuText(), 0, scrActions["editJavascripts"]->accel(), "editJavascripts");
SetKeyEntry(64, scrActions["editUndoAction"]->cleanMenuText(), 0, scrActions["editUndoAction"]->accel(), "editUndoAction");
SetKeyEntry(65, scrActions["editRedoAction"]->cleanMenuText(), 0, scrActions["editRedoAction"]->accel(), "editRedoAction");
SetKeyEntry(0, scrActions["editJavascripts"]->cleanMenuText(), 0, 0, scrActions["editJavascripts"]->accel(), "editJavascripts");
SetKeyEntry(0, scrActions["editUndoAction"]->cleanMenuText(), 0, 0, scrActions["editUndoAction"]->accel(), "editUndoAction");
SetKeyEntry(0, scrActions["editRedoAction"]->cleanMenuText(), 0, 0, scrActions["editRedoAction"]->accel(), "editRedoAction");
 
SetKeyEntry(66, tr("Show Page Palette"), viewSepal, 0);
SetKeyEntry(0, scrActions["toolsPages"]->cleanMenuText(), 0, 0, scrActions["toolsPages"]->accel(), "toolsPages");
 
SetKeyEntry(68, tr("Non Breaking Space"), 0, CTRL+Key_Space);
//SetKeyEntry(68, tr("Non Breaking Space"), 0, CTRL+Key_Space);
*/
}
 
void ScribusApp::initArrowStyles()
1001,17 → 1000,30
moveFile(oldPR3, Pff+"/scrap.scs");
}
 
return PrefsPfad;
}
 
/*!
\fn QString ScribusApp::convertToXMLPreferences(QString prefsLocation)
\author Craig Bradney
\date Sun 09 Jan 2005
\brief Convert 1.2 prefs to 1.3 prefs
\param prefsLocation Location of user preferences
\retval None
*/
bool ScribusApp::convert12Preferences(const QString prefsLocation)
{
//Now make copies for 1.3 use and leave the old ones alone for <1.3.0 usage
QString oldPR =QDir::convertSeparators(PrefsPfad+"/scribus.rc");
QString oldPR2=QDir::convertSeparators(PrefsPfad+"/scribusfont.rc");
QString oldPR3=QDir::convertSeparators(PrefsPfad+"/scrap.scs");
QString oldPR4=QDir::convertSeparators(PrefsPfad+"/prefs.xml");
QString oldPR5=QDir::convertSeparators(PrefsPfad+"/scripter.rc");
QString newPR =QDir::convertSeparators(PrefsPfad+"/scribus13.rc");
QString newPR2=QDir::convertSeparators(PrefsPfad+"/scribusfont13.rc");
QString newPR3=QDir::convertSeparators(PrefsPfad+"/scrap13.scs");
QString newPR4=QDir::convertSeparators(PrefsPfad+"/prefs13.xml");
QString newPR5=QDir::convertSeparators(PrefsPfad+"/scripter13.rc");
QString oldPR =QDir::convertSeparators(prefsLocation+"/scribus.rc");
QString oldPR2=QDir::convertSeparators(prefsLocation+"/scribusfont.rc");
QString oldPR3=QDir::convertSeparators(prefsLocation+"/scrap.scs");
QString oldPR4=QDir::convertSeparators(prefsLocation+"/prefs.xml");
QString oldPR5=QDir::convertSeparators(prefsLocation+"/scripter.rc");
QString newPR =QDir::convertSeparators(prefsLocation+"/scribus13.rc");
QString newPR2=QDir::convertSeparators(prefsLocation+"/scribusfont13.rc");
QString newPR3=QDir::convertSeparators(prefsLocation+"/scrap13.scs");
QString newPR4=QDir::convertSeparators(prefsLocation+"/prefs13.xml");
QString newPR5=QDir::convertSeparators(prefsLocation+"/scripter13.rc");
bool existsOldPR =QFile::exists(oldPR);
bool existsOldPR2=QFile::exists(oldPR2);
1024,15 → 1036,18
bool existsNewPR4=QFile::exists(newPR4);
bool existsNewPR5=QFile::exists(newPR5);
bool retVal=false;
//Only check for these two as they will be autocreated if they dont exist.
if( (existsOldPR && !existsNewPR) || (existsOldPR4 && !existsNewPR4) )
{
retVal=true; // converting from 1.2 prefs
if (splashScreen)
splashScreen->hide();
if ( (QMessageBox::question( this, tr("Migrate Old Scribus Settings?"),
tr("Scribus has detected existing Scribus 1.2 preferences files.\n"
"Do you want to migrate them to the new Scribus version?"),
QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::NoButton))==QMessageBox::Yes )
tr("Scribus has detected existing Scribus 1.2 preferences files.\n"
"Do you want to migrate them to the new Scribus version?"),
QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::NoButton))==QMessageBox::Yes )
{
if (existsOldPR && !existsNewPR)
copyFile(oldPR, newPR);
1044,26 → 1059,14
copyFile(oldPR4, newPR4);
if (existsOldPR5 && !existsNewPR5)
copyFile(oldPR5, newPR5);
}
if (splashScreen)
splashScreen->show();
}
return PrefsPfad;
return retVal;
}
 
/*!
\fn QString ScribusApp::convertToXMLPreferences(QString prefsLocation)
\author Craig Bradney
\date Sun 09 Jan 2005
\brief Convert 1.2 prefs to 1.3 prefs
\param prefsLocation Location of user preferences
\retval None
*/
void ScribusApp::convertToXMLPreferences(const QString prefsLocation)
{
 
}
 
void ScribusApp::initFileMenuActions()
{
//File Menu
1724,20 → 1727,21
YDat->setText(tmp.setNum(qRound(yp*UmReFaktor * multiplier) / divisor, 'f', precision) + suffix);
}
 
void ScribusApp::SetKeyEntry(int Nr, QString text, int Men, int KeyC, QString actName)
void ScribusApp::SetKeyEntry(QString actName, QString cleanMenuText, QString keyseq)
{
Keys ke;
ke.Name = text;
ke.MenuID = Men;
ke.KeyID = KeyC;
if (actName!="")
{
if (scrActions[actName])
{
ke.actionName=actName;
ke.keySequence = keyseq;
ke.cleanMenuText=cleanMenuText;
Prefs.KeyActions.insert(actName, ke);
}
else
qDebug(QString("Action Name: %1 does not exist").arg(actName));
}
Prefs.KeyActions.insert(Nr, ke);
}
 
void ScribusApp::DeleteSel(PageItem *b)
2002,15 → 2006,15
view->DeleteItem();
break;
case Key_Prior:
if (!b->Locked)
if (!b->locked())
view->RaiseItem();
break;
case Key_Next:
if (!b->Locked)
if (!b->locked())
view->LowerItem();
break;
case Key_Left:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->moveGroup(-10, 0);
2021,7 → 2025,7
}
break;
case Key_Right:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->moveGroup(10, 0);
2032,7 → 2036,7
}
break;
case Key_Up:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->moveGroup(0, -10);
2043,7 → 2047,7
}
break;
case Key_Down:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->moveGroup(0, 10);
2056,6 → 2060,7
default:
if (b->PType == 4)
{
/* CB TODO
if ((kk + KeyMod) == Prefs.KeyActions[59].KeyID)
{
setNewAbStyle(1);
2074,6 → 2079,7
b->Tinput = true;
view->RefreshItem(b);
}
*/
}
break;
}
2087,7 → 2093,7
switch (kk)
{
case Key_Left:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->MoveItemI(-10, 0, b->ItemNr, true);
2098,7 → 2104,7
}
break;
case Key_Right:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->MoveItemI(10, 0, b->ItemNr, true);
2109,7 → 2115,7
}
break;
case Key_Up:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->MoveItemI(0, -10, b->ItemNr, true);
2120,7 → 2126,7
}
break;
case Key_Down:
if (!b->Locked)
if (!b->locked())
{
if ( buttonState & ShiftButton )
view->MoveItemI(0, 10, b->ItemNr, true);
2597,13 → 2603,16
DeleteSel(b);
if ((kk == Key_Tab)
|| ((kk == Key_Return) && (buttonState & ShiftButton))
|| ((kk + KeyMod) == Prefs.KeyActions[60].KeyID)
|| ((kk + KeyMod) == Prefs.KeyActions[67].KeyID))
//CB TODO || ((kk + KeyMod) == Prefs.KeyActions[60].KeyID)
//CB TODO || ((kk + KeyMod) == Prefs.KeyActions[67].KeyID)
)
{
hg = new ScText;
/* CB TODO
if ((kk + KeyMod) == Prefs.KeyActions[60].KeyID)
hg->ch = QString(QChar(30));
else if (kk == Key_Return)
else */
if (kk == Key_Return)
hg->ch = QString(QChar(28));
else if (kk == Key_Tab)
hg->ch = QString(QChar(9));
2636,6 → 2645,7
view->RefreshItem(b);
break;
}
/*CB TODO
if ((kk + KeyMod) == Prefs.KeyActions[56].KeyID)
{
b->itemText.at(QMAX(b->CPos-1,0))->cstyle ^= 128;
2664,6 → 2674,7
view->RefreshItem(b);
break;
}
*/
if (((uc[0] > QChar(31)) || (as == 13) || (as == 30)) && ((*doc->AllFonts)[doc->CurrFont]->CharWidth.contains(uc[0].unicode())))
{
hg = new ScText;
3872,7 → 3883,7
view->HR->RExtra = b->RExtra;
view->HR->First = doc->docParagraphStyles[doc->currentParaStyle].First;
view->HR->Indent = doc->docParagraphStyles[doc->currentParaStyle].Indent;
if ((b->flippedH % 2 != 0) || (b->Reverse))
if (b->imageFlippedH() || (b->Reverse))
view->HR->Revers = true;
else
view->HR->Revers = false;
4028,7 → 4039,7
scrActions["itemUngroup"]->setEnabled(false);
scrActions["itemSplitPolygons"]->setEnabled( (b->PType == 6) && (b->Segments.count() != 0) );
}
if (b->Locked)
if (b->locked())
{
scrMenuMgr->setMenuEnabled("ItemShapes", false);
scrActions["itemAlignDist"]->setEnabled(false);
4109,7 → 4120,7
if (view->SelItem.count() != 0)
{
PageItem* b = view->SelItem.at(0);
scrActions["itemLock"]->setOn(b->Locked);
scrActions["itemLock"]->setOn(b->locked());
}
}
 
7544,7 → 7555,7
slotEditPaste();
for (uint b=0; b<view->SelItem.count(); ++b)
{
view->SelItem.at(b)->Locked = false;
view->SelItem.at(b)->setLocked(false);
view->MoveItem(DispX, DispY, view->SelItem.at(b));
}
}
7571,7 → 7582,7
slotEditPaste();
for (uint b=0; b<view->SelItem.count(); ++b)
{
view->SelItem.at(b)->Locked = false;
view->SelItem.at(b)->setLocked(false);
view->MoveItem(dH2, dV2, view->SelItem.at(b), true);
}
dH2 += dH;
7779,6 → 7790,7
dlclose(mo);
return;
}
 
Preferences *dia = (*demo)(this, &Prefs);
if (dia->exec())
{
8055,6 → 8067,7
Prefs.KeyActions = dia->tabKeys->getNewKeyMap();
SetShortCut();
SavePrefs();
 
QWidgetList windows = wsp->windowList();
for ( int i = 0; i < static_cast<int>(windows.count()); ++i )
{
8158,10 → 8171,10
}
}
 
void ScribusApp::ReadPrefs()
void ScribusApp::ReadPrefs(bool import12)
{
ScriXmlDoc *ss = new ScriXmlDoc();
bool erg = ss->ReadPref(&Prefs, PrefsPfad+"/scribus13.rc", splashScreen);
bool erg = ss->ReadPref(&Prefs, PrefsPfad+"/scribus13.rc", splashScreen, import12);
delete ss;
if (!erg)
return;
8913,7 → 8926,7
{
for (uint a=0; a<view->SelItem.count(); ++a)
{
if (t == -1 && view->SelItem.at(a)->Locked)
if (t == -1 && view->SelItem.at(a)->locked())
t = QMessageBox::warning(this, tr("Warning"),
tr("Some Objects are locked."),
tr("&Cancel"),
8928,7 → 8941,7
for (uint a=0; a<view->SelItem.count(); ++a)
{
b = view->SelItem.at(a);
if (b->Locked)
if (b->locked())
{
for (uint c=0; c<view->SelItem.count(); ++c)
{
9551,69 → 9564,21
{
uint a;
/* CB TODO */
for (a = 0; a < 9; ++a)
for (QMap<QString,Keys>::Iterator it = Prefs.KeyActions.begin(); it != Prefs.KeyActions.end(); ++it )
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
if (it.data().actionName!="")
if (scrActions[it.data().actionName])
scrActions[it.data().actionName]->setAccel(it.data().keySequence);
}
for (a = 9; a < 17; ++a)
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
}
//CB TODO editMenu->setAccel(Prefs.KeyActions[19].KeyID, Prefs.KeyActions[19].MenuID);
 
for (a = 20; a < 30; ++a)
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
}
for (a = 30; a < 34; ++a)
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
}
//pageMenu->setAccel(Prefs.KeyActions[61].KeyID, Prefs.KeyActions[61].MenuID);
//pageMenu->setAccel(Prefs.KeyActions[49].KeyID, Prefs.KeyActions[49].MenuID);
for (a = 34; a < 45; ++a)
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
}
for (a = 45; a < 49; ++a)
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
}
/*
extraMenu->setAccel(Prefs.KeyActions[50].KeyID, Prefs.KeyActions[50].MenuID);
extraMenu->setAccel(Prefs.KeyActions[51].KeyID, Prefs.KeyActions[51].MenuID);
*/
for (a = 52; a < 56; ++a)
{
if (Prefs.KeyActions.contains(a))
if (Prefs.KeyActions[a].actionName!="")
if (scrActions[Prefs.KeyActions[a].actionName])
scrActions[Prefs.KeyActions[a].actionName]->setAccel(Prefs.KeyActions[a].KeyID);
}
//CB itemMenu->setAccel(Prefs.KeyActions[61].KeyID, Prefs.KeyActions[61].MenuID);
//CB toolMenu->setAccel(Prefs.KeyActions[62].KeyID, Prefs.KeyActions[62].MenuID);
//CB toolMenu->setAccel(Prefs.KeyActions[66].KeyID, Prefs.KeyActions[66].MenuID);
9680,7 → 9645,7
if (dl)
{
view->SelItem.append(doc->MasterItems.at(b));
doc->DocItems.at(b)->Locked = false;
doc->DocItems.at(b)->setLocked(false);
}
else
doc->MasterItems.at(b)->LayerNr = 0;
9696,7 → 9661,7
if (dl)
{
view->SelItem.append(doc->DocItems.at(b));
doc->DocItems.at(b)->Locked = false;
doc->DocItems.at(b)->setLocked(false);
}
else
doc->DocItems.at(b)->LayerNr = 0;
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
276,8 → 276,8
PageItem *item = GetUniqueItem(QString::fromUtf8(name));
if (item == NULL)
return NULL;
item->Locked = !item->Locked;
if (item->Locked)
item->toggleLock();
if (item->locked())
return PyInt_FromLong(1);
return PyInt_FromLong(0);
}
294,7 → 294,7
PageItem *item = GetUniqueItem(QString::fromUtf8(name));
if (item == NULL)
return NULL;
if (item->Locked)
if (item->locked())
return PyBool_FromLong(1);
return PyBool_FromLong(0);
}
/branches/Version13x/Scribus/scribus/scribus.h
100,7 → 100,7
const QString getGuiLanguage();
 
void SetShortCut();
void SetKeyEntry(int Nr, QString text, int Men, int KeyC, QString actName = "");
void SetKeyEntry(QString actName, QString cleanMenuText, QString keyseq);
bool doFileNew(double b, double h, double tpr, double lr, double rr, double br, double ab, double sp,
bool atf, bool fp, int einh, bool firstleft, int Ori, int SNr, QString pagesize);
bool DoFileSave(QString fn);
232,7 → 232,7
void DelBookMark(PageItem *ite);
void BookMarkTxT(PageItem *ite);
void StoreBookmarks();
void ReadPrefs();
void ReadPrefs(bool import12);
void ReadPrefsXML();
void ManageGuides();
void SetTranspar(double t);
495,7 → 495,7
QString recentFileMenuName;
 
QString getPreferencesLocation(); //Find preferences location
void convertToXMLPreferences(const QString prefsLocation); //convert 1.2 style rc prefs to .xml style
bool convert12Preferences(const QString prefsLocation); //convert 1.2 style rc prefs and possibly to .xml style
QComboBox *ColorMenC;
/** ShapeMenu enthaelt die Rahmenformen */
QPopupMenu *ShapeMenu;
/branches/Version13x/Scribus/scribus/libpdf/pdflib.cpp
1056,9 → 1056,9
PutPage("q\n");
PutPage(SetClipPath(ite));
PutPage("h\nW*\nn\n");
if ((ite->flippedH % 2) != 0)
if (ite->imageFlippedH())
PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n");
if ((ite->flippedV % 2) != 0)
if (ite->imageFlippedV())
PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n");
if ((ite->PicAvail) && (ite->Pfile != ""))
PDF_Image(ite->InvPict, ite->Pfile, ite->LocalScX,
1793,9 → 1793,9
}
}
PutPage("q\n");
if ((ite->flippedH % 2) != 0)
if (ite->imageFlippedH())
PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n");
if ((ite->flippedV % 2) != 0)
if (ite->imageFlippedV())
PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n");
PutPage(setTextSt(ite, PNr));
PutPage("Q\n");
2133,9 → 2133,9
PutPage("q\n");
PutPage(SetClipPath(ite));
PutPage("h\nW*\nn\n");
if ((ite->flippedH % 2) != 0)
if (ite->imageFlippedH())
PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n");
if ((ite->flippedV % 2) != 0)
if (ite->imageFlippedV())
PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n");
if ((ite->PicAvail) && (ite->Pfile != ""))
PDF_Image(ite->InvPict, ite->Pfile, ite->LocalScX,
2179,9 → 2179,9
}
}
PutPage("q\n");
if ((ite->flippedH % 2) != 0)
if (ite->imageFlippedH())
PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n");
if ((ite->flippedV % 2) != 0)
if (ite->imageFlippedV())
PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n");
PutPage(setTextSt(ite, PNr));
PutPage("Q\n");
/branches/Version13x/Scribus/scribus/tree.cpp
60,6 → 60,7
}
if (kk == Key_F10)
emit ToggleAllPalettes();
/*
if ((kk + KeyMod) == ScApp->Prefs.KeyActions[46].KeyID)
emit CloseMpal();
if ((kk + KeyMod) == ScApp->Prefs.KeyActions[47].KeyID)
66,6 → 67,7
emit Schliessen();
if ((kk + KeyMod) == ScApp->Prefs.KeyActions[48].KeyID)
emit CloseSpal();
*/
QDialog::keyPressEvent(k);
}