r23166 by jghali - #15607: Image quality preview settings in the context menu are not mutually exclusive <ale>
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 28 13:41:21 UTC 2019
Author: jghali
Date: Wed Aug 28 13:41:21 2019
New Revision: 23166
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23166
Log:
#15607: Image quality preview settings in the context menu are not mutually exclusive <ale>
Modified:
trunk/Scribus/scribus/actionmanager.cpp
Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23166&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Wed Aug 28 13:41:21 2019
@@ -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,28 +454,33 @@
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));
- name="itemPDFIsBookmark";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- (*scrActions)["itemPDFIsBookmark"]->setToggleAction(true);
- name="itemPDFIsAnnotation";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- (*scrActions)["itemPDFIsAnnotation"]->setToggleAction(true);
- name="itemPDFAnnotationProps";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
- name="itemPDFFieldProps";
- scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+
+ 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);
+ name="itemPDFIsAnnotation";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ (*scrActions)["itemPDFIsAnnotation"]->setToggleAction(true);
+ name="itemPDFAnnotationProps";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name="itemPDFFieldProps";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="itemShapeEdit";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
More information about the scribus-commit
mailing list