Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 23165 → Rev 23166

/trunk/Scribus/scribus/actionmanager.cpp
285,9 → 285,9
void ActionManager::initStyleMenuActions()
{
//Text Size actions
(*scrActionGroups).insert("fontSize", new QActionGroup(mainWindow));
scrActionGroups->insert("fontSize", new QActionGroup(mainWindow));
QString name("fontSizeOther");
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("fontSize"), -1));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("fontSize"), -1));
connect( (*scrActions)["fontSizeOther"], SIGNAL(triggeredData(int)), mainWindow, SLOT(setItemFontSize(int)));
 
int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
295,7 → 295,7
for (uint s = 0; s < f_size; ++s)
{
QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("fontSize"), font_sizes[s]));
scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("fontSize"), font_sizes[s]));
(*scrActions)[fontSizeName]->setToggleAction(true);
connect( (*scrActions)[fontSizeName], SIGNAL(triggeredData(int)), mainWindow, SLOT(setItemFontSize(int)));
}
328,12 → 328,12
/*
scrActionGroups->insert("shade", new QActionGroup(mainWindow));
name="shadeOther";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("shade"), -1));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("shade"), -1));
connect( (*scrActions)["shadeOther"], SIGNAL(triggeredData(int)), mainWindow, SLOT(setItemShade(int)));
for (uint i=0; i<=100 ; i+=10)
{
QString shadeName=QString("shade%1").arg(i);
scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("shade"), i));
scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("shade"), i));
(*scrActions)[shadeName]->setToggleAction(true);
connect( (*scrActions)[shadeName], SIGNAL(triggeredData(int)), mainWindow, SLOT(setItemShade(int)));
}
342,25 → 342,25
//Type Effects actions
scrActionGroups->insert("typeEffects", new QActionGroup(mainWindow));
name="typeEffectNormal";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 0));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 0));
name="typeEffectUnderline";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 1));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 1));
name="typeEffectUnderlineWords";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 8));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 8));
name="typeEffectStrikeThrough";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 2));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 2));
name="typeEffectAllCaps";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 7));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 7));
name="typeEffectSmallCaps";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 3));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 3));
name="typeEffectSuperscript";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 4));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 4));
name="typeEffectSubscript";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 5));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 5));
name="typeEffectOutline";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 6));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 6));
name="typeEffectShadow";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), (*scrActionGroups).value("typeEffects"), 9));
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), scrActionGroups->value("typeEffects"), 9));
(*scrActions)["typeEffectNormal"]->setToggleAction(true);
(*scrActions)["typeEffectUnderline"]->setToggleAction(true);
(*scrActions)["typeEffectUnderlineWords"]->setToggleAction(true);
389,7 → 389,6
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
connect( (*scrActions)["styleImageEffects"], SIGNAL(triggered()), mainWindow, SLOT(ImageEffects()));
connect( (*scrActions)["styleTabulators"], SIGNAL(triggered()), mainWindow, SLOT(EditTabs()));
 
}
 
void ActionManager::initItemMenuActions()
455,12 → 454,23
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="itemToggleInlineImage";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="itemPreviewFull";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), mainWindow, 0));
name="itemPreviewNormal";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), mainWindow, 1));
name="itemPreviewLow";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), mainWindow, 2));
 
QActionGroup* itemPreviewGroup = new QActionGroup(mainWindow);
scrActionGroups->insert("itemPreview", itemPreviewGroup);
itemPreviewGroup->setExclusive(true);
name = "itemPreviewFull";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), itemPreviewGroup, 0));
name = "itemPreviewNormal";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), itemPreviewGroup, 1));
name = "itemPreviewLow";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), itemPreviewGroup, 2));
 
(*scrActions)["itemImageIsVisible"]->setToggleAction(true);
(*scrActions)["itemPreviewFull"]->setToggleAction(true);
(*scrActions)["itemPreviewNormal"]->setToggleAction(true);
(*scrActions)["itemPreviewLow"]->setToggleAction(true);
(*scrActions)["itemToggleInlineImage"]->setToggleAction(true);
 
name="itemPDFIsBookmark";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
(*scrActions)["itemPDFIsBookmark"]->setToggleAction(true);
472,12 → 482,6
name="itemPDFFieldProps";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 
(*scrActions)["itemImageIsVisible"]->setToggleAction(true);
(*scrActions)["itemPreviewFull"]->setToggleAction(true);
(*scrActions)["itemPreviewNormal"]->setToggleAction(true);
(*scrActions)["itemPreviewLow"]->setToggleAction(true);
(*scrActions)["itemToggleInlineImage"]->setToggleAction(true);
 
name="itemShapeEdit";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
(*scrActions)["itemShapeEdit"]->setToggleAction(true);