Back to index

scribus-ng  1.3.4.dfsg+svn20071115
actionmanager.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008        begin                : Apr 2005
00009        copyright            : (C) 2005 by Craig Bradney
00010        email                : cbradney@zip.com.au
00011 ***************************************************************************/
00012 
00013 /***************************************************************************
00014 *                                                                         *
00015 *   mainWindow program is free software; you can redistribute it and/or modify  *
00016 *   it under the terms of the GNU General Public License as published by  *
00017 *   the Free Software Foundation; either version 2 of the License, or     *
00018 *   (at your option) any later version.                                   *
00019 *                                                                         *
00020 ***************************************************************************/
00021 
00022 #include "actionmanager.h"
00023 #include "actionmanager.moc"
00024 
00025 #include "scribus.h"
00026 #include "scribusdoc.h"
00027 #include "scribusview.h"
00028 #include "selection.h"
00029 #include "undomanager.h"
00030 #include "util.h"
00031 #include "text/storytext.h"
00032 
00033 QMap<QString, QKeySequence> ActionManager::defKeys;
00034 QValueVector< QPair<QString, QStringList> > ActionManager::defMenus;
00035 QValueVector< QPair<QString, QStringList> > ActionManager::defNonMenuActions;
00036 
00037 ActionManager::ActionManager ( QObject * parent, const char * name ) :
00038        QObject ( parent, name ),
00039        mainWindow(0)
00040 {
00041 }
00042 
00043 ActionManager::~ActionManager()
00044 {
00045        delete modeActionNames;
00046        delete nonEditActionNames;
00047        delete unicodeCharActionNames;
00048 }
00049 
00050 void ActionManager::init(ScribusMainWindow *mw)
00051 {
00052        mainWindow=mw;
00053        scrActions=&(mainWindow->scrActions);
00054        scrActionGroups=&(mainWindow->scrActionGroups);
00055        modeActionNames=new QStringList();
00056        nonEditActionNames=new QStringList();
00057        unicodeCharActionNames=new QStringList();
00058        undoManager = UndoManager::instance();
00059 
00060 #ifdef Q_WS_MAC
00061        noIcon = loadIcon("noicon.xpm");
00062 #endif
00063 
00064        createActions();
00065        languageChange();
00066 }
00067 
00068 void ActionManager::createActions()
00069 {
00070        initFileMenuActions();
00071        initEditMenuActions();
00072        initStyleMenuActions();
00073        initItemMenuActions();
00074        initInsertMenuActions();
00075        initPageMenuActions();
00076        initViewMenuActions();
00077        initToolsMenuActions();
00078        initExtrasMenuActions();
00079        initWindowsMenuActions();
00080        initScriptMenuActions();
00081        initHelpMenuActions();
00082        initUnicodeActions(scrActions, mainWindow, unicodeCharActionNames);
00083        enableUnicodeActions(scrActions, false);
00084        initSpecialActions();
00085 }
00086 
00087 void ActionManager::initFileMenuActions()
00088 {
00089        QString name;
00090        //File Menu
00091        name="fileNew";
00092        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-new.png"), loadIcon("22/document-new.png")), "", defKeys[name], mainWindow, name));
00093        name="fileOpen";
00094        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-open.png"), loadIcon("22/document-open.png")), "", defKeys[name], mainWindow, name));
00095        name="fileClose";
00096        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/close.png"), loadIcon("22/close.png")), "", defKeys[name], mainWindow, name));
00097        name="fileSave";
00098        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-save.png"), loadIcon("22/document-save.png")), "", defKeys[name], mainWindow, name));
00099        name="fileSaveAs";
00100        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-save-as.png"), loadIcon("22/document-save-as.png")), "", defKeys[name], mainWindow, name));
00101        name="fileRevert";
00102        scrActions->insert(name, new ScrAction(loadIcon("revert.png"), "", defKeys[name], mainWindow, name));
00103        name="fileCollect";
00104        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00105        //File Import Menu
00106        name="fileImportText";
00107        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00108        name="fileImportText2";
00109        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00110        name="fileImportAppendText";
00111        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00112        name="fileImportImage";
00113        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00114 
00115        //File Export Menu
00116        name="fileExportText";
00117        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00118        name="fileExportAsEPS";
00119        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00120        name="fileExportAsPDF";
00121        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("acroread16.png"),loadIcon("acroread22.png")), "", defKeys[name], mainWindow, name));
00122        //Rest of File Menu
00123        name="fileDocSetup";
00124        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-properties.png"), loadIcon("22/document-properties.png")), "", defKeys[name], mainWindow, name));
00125        name="filePreferences";
00126        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00127        name="filePrint";
00128        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-print.png"), loadIcon("22/document-print.png")), "", defKeys[name], mainWindow, name));
00129        name="PrintPreview";
00130        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/document-print-preview.png"), loadIcon("22/document-print-preview.png")), "", defKeys[name], mainWindow, name));
00131        name="fileQuit";
00132        scrActions->insert(name, new ScrAction(QPixmap(loadIcon("exit.png")), "", defKeys[name], mainWindow, name));
00133 
00134        //Connect our signals and slots
00135        //File Menu
00136        connect( (*scrActions)["fileNew"], SIGNAL(activated()), mainWindow, SLOT(slotFileNew()) );
00137        connect( (*scrActions)["fileOpen"], SIGNAL(activated()), mainWindow, SLOT(slotDocOpen()) );
00138        connect( (*scrActions)["fileClose"], SIGNAL(activated()), mainWindow, SLOT(slotFileClose()) );
00139        connect( (*scrActions)["filePrint"], SIGNAL(activated()), mainWindow, SLOT(slotFilePrint()) );
00140        connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), mainWindow, SLOT(printPreview()) );
00141        connect( (*scrActions)["fileSave"], SIGNAL(activated()), mainWindow, SLOT(slotFileSave()) );
00142        connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), mainWindow, SLOT(slotFileSaveAs()) );
00143        connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), mainWindow, SLOT(slotDocSetup()) );
00144        connect( (*scrActions)["filePreferences"], SIGNAL(activated()), mainWindow, SLOT(slotPrefsOrg()) );
00145        connect( (*scrActions)["fileRevert"], SIGNAL(activated()), mainWindow, SLOT(slotFileRevert()) );
00146        connect( (*scrActions)["fileCollect"], SIGNAL(activated()), mainWindow, SLOT(Collect()) );
00147        connect( (*scrActions)["fileQuit"], SIGNAL(activated()), mainWindow, SLOT(slotFileQuit()) );
00148        //File Import Menu
00149        connect( (*scrActions)["fileImportText"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent()) );
00150        connect( (*scrActions)["fileImportText2"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent2()) );
00151        connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), mainWindow, SLOT(slotFileAppend()) );
00152        connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent()) );
00153        //File Export Menu
00154        connect( (*scrActions)["fileExportText"], SIGNAL(activated()), mainWindow, SLOT(SaveText()) );
00155        connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), mainWindow, SLOT(SaveAsEps()) );
00156        connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), mainWindow, SLOT(SaveAsPDF()) );
00157        //The rest are plugins
00158 }
00159 
00160 void ActionManager::initEditMenuActions()
00161 {
00162        QString name;
00163        //Edit Menu
00164        name="editUndoAction";
00165        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-undo.png"), loadIcon("22/edit-undo.png")), "", defKeys[name], mainWindow, name,1));
00166        name="editRedoAction";
00167        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-redo.png"), loadIcon("22/edit-redo.png")), "", defKeys[name], mainWindow, name, 1));
00168        name="editActionMode";
00169        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00170        (*scrActions)["editActionMode"]->setToggleAction(true);
00171 
00172        name="editCut";
00173        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-cut.png"), loadIcon("22/edit-cut.png")), "", defKeys[name], mainWindow, name));
00174        name="editCopy";
00175        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png")), "", defKeys[name], mainWindow, name));
00176        name="editPaste";
00177        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-paste.png"), loadIcon("22/edit-paste.png")), "", defKeys[name], mainWindow, name));
00178        name="editCopyContents";
00179        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png")), "", defKeys[name], mainWindow, name));
00180        name="editPasteContents";
00181        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-paste.png")), "", defKeys[name], mainWindow, name,0));
00182        name="editPasteContentsAbs";
00183        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("16/edit-paste.png")), "", defKeys[name], mainWindow, name,1));
00184        name="editClearContents";
00185        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-delete.png"), loadIcon("22/edit-delete.png")), "", defKeys[name], mainWindow, name));
00186        name="editSelectAll";
00187        scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
00188        name="editDeselectAll";
00189        scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
00190        name="editSearchReplace";
00191        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/edit-find-replace.png"), loadIcon("22/edit-find-replace.png")), "", defKeys[name], mainWindow, name));
00192        name="editEditWithImageEditor";
00193        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00194        name="editColors";
00195        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00196        name="editPatterns";
00197        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00198        name="editStyles";
00199        scrActions->insert(name, new ScrAction(QIconSet(noIcon), "", defKeys[name], mainWindow, name));
00200        name="editMasterPages";
00201        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00202        name="editJavascripts";
00203        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00204 
00205        (*scrActions)["editStyles"]->setToggleAction(true);
00206 
00207        connect( (*scrActions)["editUndoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(undo(int)) );
00208        connect( (*scrActions)["editRedoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(redo(int)) );
00209        connect( (*scrActions)["editActionMode"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoMode(bool)) );
00210        connect( (*scrActions)["editCut"], SIGNAL(activated()), mainWindow, SLOT(slotEditCut()) );
00211        connect( (*scrActions)["editCopy"], SIGNAL(activated()), mainWindow, SLOT(slotEditCopy()) );
00212        connect( (*scrActions)["editPaste"], SIGNAL(activated()), mainWindow, SLOT(slotEditPaste()) );
00213        connect( (*scrActions)["editCopyContents"], SIGNAL(activated()), mainWindow, SLOT(slotEditCopyContents()) );
00214        connect( (*scrActions)["editPasteContents"], SIGNAL(activatedData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
00215        connect( (*scrActions)["editPasteContentsAbs"], SIGNAL(activatedData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
00216        connect( (*scrActions)["editSelectAll"], SIGNAL(activated()), mainWindow, SLOT(SelectAll()) );
00217        connect( (*scrActions)["editDeselectAll"], SIGNAL(activated()), mainWindow, SLOT(deselectAll()) );
00218        connect( (*scrActions)["editSearchReplace"], SIGNAL(activated()), mainWindow, SLOT(SearchText()) );
00219        connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(activated()), mainWindow, SLOT(callImageEditor()) );
00220        connect( (*scrActions)["editColors"], SIGNAL(activated()), mainWindow, SLOT(slotEditColors()) );
00221        connect( (*scrActions)["editPatterns"], SIGNAL(activated()), mainWindow, SLOT(managePatterns()) );
00222 //     connect( (*scrActions)["editStyles"], SIGNAL(activated()), mainWindow, SLOT(slotStyleManager()) );
00223        connect( (*scrActions)["editMasterPages"], SIGNAL(activated()), mainWindow, SLOT(manageMasterPages()) );
00224        connect( (*scrActions)["editJavascripts"], SIGNAL(activated()), mainWindow, SLOT(ManageJava()) );
00225 }
00226 
00227 void ActionManager::initStyleMenuActions()
00228 {
00229        QString name;
00230        //Text Size actions
00231        (*scrActionGroups).insert("fontSize", new QActionGroup(mainWindow, "fontSize", true));
00232        name="fontSizeOther";
00233        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["fontSize"], name, -1));
00234        connect( (*scrActions)["fontSizeOther"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemFSize(int)));
00235 
00236        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
00237        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
00238        for (uint s = 0; s < f_size; ++s)
00239        {
00240               QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
00241               scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["fontSize"], fontSizeName, font_sizes[s]));
00242               (*scrActions)[fontSizeName]->setToggleAction(true);
00243               connect( (*scrActions)[fontSizeName], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemFSize(int)));
00244        }
00245 
00246        //Alignment actions
00247        name="alignLeft";
00248        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 0));
00249        name="alignCenter";
00250        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 1));
00251        name="alignRight";
00252        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 2));
00253        name="alignBlock";
00254        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 3));
00255        name="alignForced";
00256        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 4));
00257 
00258        (*scrActions)["alignLeft"]->setToggleAction(true);
00259        (*scrActions)["alignCenter"]->setToggleAction(true);
00260        (*scrActions)["alignRight"]->setToggleAction(true);
00261        (*scrActions)["alignBlock"]->setToggleAction(true);
00262        (*scrActions)["alignForced"]->setToggleAction(true);
00263 
00264        connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
00265        connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
00266        connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
00267        connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
00268        connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
00269 
00270        //Shade actions
00271        scrActionGroups->insert("shade", new QActionGroup(mainWindow, "shade", true));
00272        name="shadeOther";
00273        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["shade"], name, -1));
00274        connect( (*scrActions)["shadeOther"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemShade(int)));
00275        for (uint i=0; i<=100 ; i+=10)
00276        {
00277               QString shadeName=QString("shade%1").arg(i);
00278               scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["shade"], shadeName, i));
00279               (*scrActions)[shadeName]->setToggleAction(true);
00280               connect( (*scrActions)[shadeName], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemShade(int)));
00281        }
00282 
00283        //Type Effects actions
00284        scrActionGroups->insert("typeEffects", new QActionGroup(mainWindow, "typeEffects", false));
00285        name="typeEffectNormal";
00286        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 0));
00287        name="typeEffectUnderline";
00288        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 1));
00289        name="typeEffectUnderlineWords";
00290        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 8));
00291        name="typeEffectStrikeThrough";
00292        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 2));
00293        name="typeEffectAllCaps";
00294        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 7));
00295        name="typeEffectSmallCaps";
00296        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 3));
00297        name="typeEffectSuperscript";
00298        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 4));
00299        name="typeEffectSubscript";
00300        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 5));
00301        name="typeEffectOutline";
00302        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 6));
00303        name="typeEffectShadow";
00304        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], (*scrActionGroups)["typeEffects"], name, 9));
00305        (*scrActions)["typeEffectNormal"]->setToggleAction(true);
00306        (*scrActions)["typeEffectUnderline"]->setToggleAction(true);
00307        (*scrActions)["typeEffectUnderlineWords"]->setToggleAction(true);
00308        (*scrActions)["typeEffectStrikeThrough"]->setToggleAction(true);
00309        (*scrActions)["typeEffectAllCaps"]->setToggleAction(true);
00310        (*scrActions)["typeEffectSmallCaps"]->setToggleAction(true);
00311        (*scrActions)["typeEffectSuperscript"]->setToggleAction(true);
00312        (*scrActions)["typeEffectSubscript"]->setToggleAction(true);
00313        (*scrActions)["typeEffectOutline"]->setToggleAction(true);
00314        (*scrActions)["typeEffectShadow"]->setToggleAction(true);
00315        connect( (*scrActions)["typeEffectNormal"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00316        connect( (*scrActions)["typeEffectUnderline"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00317        connect( (*scrActions)["typeEffectUnderlineWords"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00318        connect( (*scrActions)["typeEffectStrikeThrough"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00319        connect( (*scrActions)["typeEffectSmallCaps"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00320        connect( (*scrActions)["typeEffectAllCaps"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00321        connect( (*scrActions)["typeEffectSuperscript"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00322        connect( (*scrActions)["typeEffectSubscript"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00323        connect( (*scrActions)["typeEffectOutline"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00324        connect( (*scrActions)["typeEffectShadow"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
00325 
00326        //Other Style menu items that get added in various places
00327        name="styleImageEffects";
00328        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00329        name="styleTabulators";
00330        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00331        connect( (*scrActions)["styleImageEffects"], SIGNAL(activated()), mainWindow, SLOT(ImageEffects()));
00332        connect( (*scrActions)["styleTabulators"], SIGNAL(activated()), mainWindow, SLOT(EditTabs()));
00333 
00334 }
00335 
00336 void ActionManager::initItemMenuActions()
00337 {
00338        QString name;
00339        //Item Menu
00340        name="itemDuplicate";
00341        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00342        name="itemMulDuplicate";
00343        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00344        name="itemDelete";
00345        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00346        name="itemGroup";
00347        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00348        name="itemUngroup";
00349        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00350        name="itemLock";
00351        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00352        name="itemLockSize";
00353        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00354        name="itemPrintingEnabled";
00355        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00356        name="itemFlipH";
00357        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00358        name="itemFlipV";
00359        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00360        (*scrActions)["itemLock"]->setToggleAction(true, true);
00361        (*scrActions)["itemLockSize"]->setToggleAction(true, true);
00362        (*scrActions)["itemPrintingEnabled"]->setToggleAction(true, true);
00363        (*scrActions)["itemFlipH"]->setToggleAction(true, true);
00364        (*scrActions)["itemFlipV"]->setToggleAction(true, true);
00365        name="itemLowerToBottom";
00366        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-bottom.png"), loadIcon("22/go-bottom.png")), "", defKeys[name], mainWindow, name));
00367        name="itemRaiseToTop";
00368        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-top.png"), loadIcon("22/go-top.png")), "", defKeys[name], mainWindow, name));
00369        name="itemLower";
00370        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-down.png"), loadIcon("22/go-down.png")), "", defKeys[name], mainWindow, name));
00371        name="itemRaise";
00372        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/go-up.png"), loadIcon("22/go-up.png")), "", defKeys[name], mainWindow, name));
00373        name="itemSendToScrapbook";
00374        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00375        name="itemSendToPattern";
00376        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00377        name="itemImageInfo";
00378        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00379        name="itemAttributes";
00380        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00381        name="itemImageIsVisible";
00382        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00383        name="itemUpdateImage";
00384        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00385        name="itemAdjustFrameToImage";
00386        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00387        name="itemExtendedImageProperties";
00388        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00389        name="itemPreviewLow";
00390        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 2));
00391        name="itemPreviewNormal";
00392        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 1));
00393        name="itemPreviewFull";
00394        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QIconSet(), "", defKeys[name], mainWindow, name, 0));
00395        name="itemPDFIsBookmark";
00396        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00397        (*scrActions)["itemPDFIsBookmark"]->setToggleAction(true);
00398        name="itemPDFIsAnnotation";
00399        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00400        (*scrActions)["itemPDFIsAnnotation"]->setToggleAction(true);
00401        name="itemPDFAnnotationProps";
00402        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00403        name="itemPDFFieldProps";
00404        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00405 
00406        (*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
00407        (*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
00408        (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
00409        (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
00410 
00411        (*scrActions)["itemImageIsVisible"]->setToggleAction(true);
00412        (*scrActions)["itemPreviewLow"]->setToggleAction(true);
00413        (*scrActions)["itemPreviewNormal"]->setToggleAction(true);
00414        (*scrActions)["itemPreviewFull"]->setToggleAction(true);
00415 
00416        name="itemShapeEdit";
00417        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00418        (*scrActions)["itemShapeEdit"]->setToggleAction(true);
00419        name="itemAttachTextToPath";
00420        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00421        name="itemDetachTextFromPath";
00422        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00423        name="itemCombinePolygons";
00424        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00425        name="itemSplitPolygons";
00426        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00427        name="itemConvertToBezierCurve";
00428        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00429        name="itemConvertToImageFrame";
00430        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00431        name="itemConvertToOutlines";
00432        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00433        name="itemConvertToPolygon";
00434        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00435        name="itemConvertToTextFrame";
00436        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00437 
00438        connect( (*scrActions)["itemDuplicate"], SIGNAL(activated()), mainWindow, SLOT(ObjektDup()) );
00439        connect( (*scrActions)["itemMulDuplicate"], SIGNAL(activated()), mainWindow, SLOT(ObjektDupM()) );
00440        connect( (*scrActions)["itemGroup"], SIGNAL(activated()), mainWindow, SLOT(GroupObj()) );
00441        connect( (*scrActions)["itemUngroup"], SIGNAL(activated()), mainWindow, SLOT(UnGroupObj()) );
00442        connect( (*scrActions)["itemPDFAnnotationProps"], SIGNAL(activated()), mainWindow, SLOT(ModifyAnnot()) );
00443        connect( (*scrActions)["itemPDFFieldProps"], SIGNAL(activated()), mainWindow, SLOT(ModifyAnnot()) );
00444        connect( (*scrActions)["itemSendToScrapbook"], SIGNAL(activated()), mainWindow, SLOT(PutScrap()) );
00445        connect( (*scrActions)["itemSendToPattern"], SIGNAL(activated()), mainWindow, SLOT(PutToPatterns()) );
00446        connect( (*scrActions)["itemAttributes"], SIGNAL(activated()), mainWindow, SLOT(objectAttributes()) );
00447        connect( (*scrActions)["itemShapeEdit"], SIGNAL(activated()), mainWindow, SLOT(ToggleFrameEdit()) );
00448        connect( (*scrActions)["itemImageInfo"], SIGNAL(activated()), mainWindow, SLOT(getImageInfo()) );
00449 }
00450 
00451 void ActionManager::initInsertMenuActions()
00452 {
00453        QString name;
00454        //Insert Menu
00455        name="insertFrame";
00456        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00457        name="insertGlyph";
00458        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00459        (*scrActions)["insertGlyph"]->setToggleAction(true);
00460        name="insertSampleText";
00461        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00462        name="stickyTools";
00463        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00464        (*scrActions)["stickyTools"]->setToggleAction(true);
00465 
00466        connect( (*scrActions)["insertFrame"], SIGNAL(activated()), mainWindow, SLOT(slotInsertFrame()) );
00467        connect( (*scrActions)["insertGlyph"], SIGNAL(activated()), mainWindow, SLOT(slotCharSelect()) );
00468        connect( (*scrActions)["insertSampleText"], SIGNAL(activated()), mainWindow, SLOT(insertSampleText()) );
00469        connect( (*scrActions)["stickyTools"], SIGNAL(activated()), mainWindow, SLOT(ToggleStickyTools()) );
00470 }
00471 
00472 void ActionManager::initPageMenuActions()
00473 {
00474        QString name;
00475        //Page menu
00476        name="pageInsert";
00477        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00478        name="pageImport";
00479        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00480        name="pageDelete";
00481        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00482        name="pageCopy";
00483        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00484        name="pageMove";
00485        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00486        name="pageApplyMasterPage";
00487        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00488        name="pageCopyToMasterPage";
00489        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00490        name="pageManageGuides";
00491        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00492        (*scrActions)["pageManageGuides"]->setToggleAction(true);
00493        name="pageManageMargins";
00494        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00495 
00496        connect( (*scrActions)["pageInsert"], SIGNAL(activated()), mainWindow, SLOT(slotNewPageM()) );
00497        connect( (*scrActions)["pageImport"], SIGNAL(activated()), mainWindow, SLOT(slotPageImport()) );
00498        connect( (*scrActions)["pageDelete"], SIGNAL(activated()), mainWindow, SLOT(DeletePage()) );
00499        connect( (*scrActions)["pageCopy"], SIGNAL(activated()), mainWindow, SLOT(CopyPage()) );
00500        connect( (*scrActions)["pageMove"], SIGNAL(activated()), mainWindow, SLOT(MovePage()) );
00501        connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(activated()), mainWindow, SLOT(ApplyMasterPage()) );
00502        connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(activated()), mainWindow, SLOT(duplicateToMasterPage()) );
00503        connect( (*scrActions)["pageManageMargins"], SIGNAL(activated()), mainWindow, SLOT(changePageMargins()) );
00504 }
00505 
00506 void ActionManager::initViewMenuActions()
00507 {
00508        QString name;
00509        name="viewFitInWindow";
00510        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, -100.0));
00511        name="viewFitWidth";
00512        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, -200.0));
00513        name="viewFit50";
00514        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 50.0));
00515        name="viewFit75";
00516        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 75.0));
00517        name="viewFit100";
00518        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(loadIcon("16/zoom-original.png"),loadIcon("22/zoom-original.png")), "", defKeys[name], mainWindow, name, 0, 100.0));
00519        name="viewFit200";
00520        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 200.0));
00521        name="viewFitPreview";
00522        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QIconSet(), "", defKeys[name], mainWindow, name, 0, 20.0));
00523        name="viewShowMargins";
00524        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00525        name="viewShowBleeds";
00526        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00527        name="viewShowFrames";
00528        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00529        name="viewShowLayerMarkers";
00530        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00531        name="viewShowImages";
00532        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00533        name="viewShowGrid";
00534        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00535        name="viewShowGuides";
00536        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00537        name="viewShowColumnBorders";
00538        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00539        name="viewShowBaseline";
00540        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00541        name="viewShowTextChain";
00542        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00543        name="viewShowTextControls";
00544        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00545        name="viewShowRulers";
00546        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00547        name="viewRulerMode";
00548        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00549        name="viewSnapToGrid";
00550        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00551        name="viewSnapToGuides";
00552        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00553 //     scrActions->insert("viewNewView", new ScrAction("", defKeys[name], mainWindow, name));
00554 
00555 #ifdef HAVE_CAIRO
00556        (*scrActions)["viewFitPreview"]->setToggleAction(true);
00557 #endif
00558        (*scrActions)["viewShowMargins"]->setToggleAction(true);
00559        (*scrActions)["viewShowBleeds"]->setToggleAction(true);
00560        (*scrActions)["viewShowFrames"]->setToggleAction(true);
00561        (*scrActions)["viewShowLayerMarkers"]->setToggleAction(true);
00562        (*scrActions)["viewShowImages"]->setToggleAction(true);
00563        (*scrActions)["viewShowGrid"]->setToggleAction(true);
00564        (*scrActions)["viewShowGuides"]->setToggleAction(true);
00565        (*scrActions)["viewShowColumnBorders"]->setToggleAction(true);
00566        (*scrActions)["viewShowBaseline"]->setToggleAction(true);
00567        (*scrActions)["viewShowTextChain"]->setToggleAction(true);
00568        (*scrActions)["viewShowTextControls"]->setToggleAction(true);
00569        (*scrActions)["viewShowRulers"]->setToggleAction(true);
00570        (*scrActions)["viewRulerMode"]->setToggleAction(true);
00571        (*scrActions)["viewSnapToGrid"]->setToggleAction(true);
00572        (*scrActions)["viewSnapToGuides"]->setToggleAction(true);
00573 
00574 #ifdef HAVE_CAIRO
00575        (*scrActions)["viewFitPreview"]->setOn(false);
00576 #endif
00577        (*scrActions)["viewShowMargins"]->setOn(true);
00578        (*scrActions)["viewShowBleeds"]->setOn(true);
00579        (*scrActions)["viewShowFrames"]->setOn(true);
00580        (*scrActions)["viewShowLayerMarkers"]->setOn(false);
00581        (*scrActions)["viewShowImages"]->setOn(true);
00582        (*scrActions)["viewShowGuides"]->setOn(true);
00583        (*scrActions)["viewShowColumnBorders"]->setOn(false);
00584        (*scrActions)["viewShowRulers"]->setOn(true);
00585        (*scrActions)["viewRulerMode"]->setOn(true);
00586 
00587        connect( (*scrActions)["viewFitInWindow"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00588        connect( (*scrActions)["viewFitWidth"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00589        connect( (*scrActions)["viewFit50"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00590        connect( (*scrActions)["viewFit75"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00591        connect( (*scrActions)["viewFit100"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00592        connect( (*scrActions)["viewFit200"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00593 #ifndef HAVE_CAIRO
00594        connect( (*scrActions)["viewFitPreview"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
00595 #endif
00596        connect( (*scrActions)["viewShowMargins"], SIGNAL(activated()), mainWindow, SLOT(ToggleMarks()) );
00597        connect( (*scrActions)["viewShowBleeds"], SIGNAL(activated()), mainWindow, SLOT(ToggleBleeds()) );
00598        connect( (*scrActions)["viewShowFrames"], SIGNAL(activated()), mainWindow, SLOT(ToggleFrames()) );
00599        connect( (*scrActions)["viewShowLayerMarkers"], SIGNAL(activated()), mainWindow, SLOT(ToggleLayerMarkers()) );
00600        connect( (*scrActions)["viewShowImages"], SIGNAL(activated()), mainWindow, SLOT(TogglePics()) );
00601        connect( (*scrActions)["viewShowGrid"], SIGNAL(activated()), mainWindow, SLOT(ToggleRaster()) );
00602        connect( (*scrActions)["viewShowGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleGuides()) );
00603        connect( (*scrActions)["viewShowColumnBorders"], SIGNAL(activated()), mainWindow, SLOT(ToggleColumnBorders()) );
00604        connect( (*scrActions)["viewShowBaseline"], SIGNAL(activated()), mainWindow, SLOT(ToggleBase()) );
00605        connect( (*scrActions)["viewShowTextChain"], SIGNAL(activated()), mainWindow, SLOT(ToggleTextLinks()) );
00606        connect( (*scrActions)["viewShowTextControls"], SIGNAL(activated()), mainWindow, SLOT(ToggleTextControls()) );
00607        connect( (*scrActions)["viewShowRulers"], SIGNAL(activated()), mainWindow, SLOT(ToggleRulers()) );
00608        connect( (*scrActions)["viewRulerMode"], SIGNAL(activated()), mainWindow, SLOT(ToggleRulerMode()) );
00609        connect( (*scrActions)["viewSnapToGrid"], SIGNAL(activated()), mainWindow, SLOT(ToggleURaster()) );
00610        connect( (*scrActions)["viewSnapToGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleUGuides()) );
00611 //     connect( (*scrActions)["viewNewView"], SIGNAL(activated()), mainWindow, SLOT(newView()) );
00612 
00613 }
00614 
00615 void ActionManager::initToolsMenuActions()
00616 {
00617        QString name;
00618        //Tool menu
00619        name="toolsProperties";
00620        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00621        name="toolsOutline";
00622        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00623        name="toolsScrapbook";
00624        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00625        name="toolsLayers";
00626        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00627        name="toolsPages";
00628        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00629        name="toolsBookmarks";
00630        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00631        name="toolsMeasurements";
00632        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/measure.png"), loadIcon("22/measure.png")), "", defKeys[name], mainWindow, name, modeMeasurementTool));
00633        name="toolsActionHistory";
00634        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00635        name="toolsPreflightVerifier";
00636        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/preflight-verifier.png"), loadIcon("22/preflight-verifier.png")),"", defKeys[name], mainWindow, name));
00637        name="toolsAlignDistribute";
00638        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00639        name="toolsToolbarTools";
00640        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00641        name="toolsToolbarPDF";
00642        scrActions->insert(name, new ScrAction(QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00643 
00644        //toolbar only items
00645        name="toolsSelect";
00646        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/pointer.png"), loadIcon("22/pointer.png")), "", defKeys[name], mainWindow, name, modeNormal));
00647        name="toolsInsertTextFrame";
00648        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-text-frame.png"), loadIcon("22/insert-text-frame.png")), "", defKeys[name], mainWindow, name, modeDrawText));
00649        name="toolsInsertImageFrame";
00650        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-image.png"), loadIcon("22/insert-image.png")), "", defKeys[name], mainWindow, name, modeDrawPicture));
00651        name="toolsInsertTableFrame";
00652        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/insert-table.png"), loadIcon("22/insert-table.png")), "", defKeys[name], mainWindow, name, modeDrawTable));
00653        name="toolsInsertShape";
00654        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(), "", defKeys[name], mainWindow, name, modeDrawShapes));
00655        name="toolsInsertPolygon";
00656        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/draw-polygon.png"), loadIcon("22/draw-polygon.png")), "", defKeys[name], mainWindow, name, modeDrawRegularPolygon));
00657        name="toolsInsertLine";
00658        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stift16.xpm"), loadIcon("Stift.xpm")), "", defKeys[name], mainWindow, name, modeDrawLine));
00659        name="toolsInsertBezier";
00660        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/draw-path.png"), loadIcon("22/draw-path.png")), "", defKeys[name], mainWindow, name, modeDrawBezierLine));
00661        name="toolsInsertFreehandLine";
00662        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/draw-freehand.png"), loadIcon("22/draw-freehand.png")), "", defKeys[name], mainWindow, name, modeDrawFreehandLine));
00663        name="toolsRotate";
00664        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/transform-rotate.png"), loadIcon("22/transform-rotate.png")), "", defKeys[name], mainWindow, name, modeRotation));
00665        name="toolsZoom";
00666        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/zoom.png"), loadIcon("22/zoom.png")), "", defKeys[name], mainWindow, name, modeMagnifier));
00667        name="toolsZoomIn";
00668        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/zoom-in.png"), loadIcon("22/zoom-in.png")), "", defKeys[name], mainWindow, name));
00669        name="toolsZoomOut";
00670        scrActions->insert(name, new ScrAction(QIconSet(loadIcon("16/zoom-out.png"), loadIcon("22/zoom-out.png")), "", defKeys[name], mainWindow, name));
00671        name="toolsEditContents";
00672        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Editm.xpm"), loadIcon("Editm.xpm")), "", defKeys[name], mainWindow, name, modeEdit));
00673        name="toolsEditWithStoryEditor";
00674        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/story-editor.png"), loadIcon("22/story-editor.png")), "", defKeys[name], mainWindow, name, modeStoryEditor));
00675        name="toolsLinkTextFrame";
00676        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/text-frame-link.png"), loadIcon("22/text-frame-link.png")), "", defKeys[name], mainWindow, name, modeLinkFrames));
00677        name="toolsUnlinkTextFrame";
00678        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/text-frame-unlink.png"), loadIcon("22/text-frame-unlink.png")), "", defKeys[name], mainWindow, name, modeUnlinkFrames));
00679        name="toolsEyeDropper";
00680        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("16/color-picker.png"), loadIcon("22/color-picker.png")), "", defKeys[name], mainWindow, name, modeEyeDropper));
00681        name="toolsCopyProperties";
00682        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("wizard.png"), loadIcon("wizard.png")), "", defKeys[name], mainWindow, name, modeCopyProperties));
00683 
00684        //PDF toolbar
00685        name="toolsPDFPushButton";
00686        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/insert-button.png")), "", defKeys[name], mainWindow, name, modeInsertPDFButton));
00687        name="toolsPDFTextField";
00688        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/text-field.png")), "", defKeys[name], mainWindow, name, modeInsertPDFTextfield));
00689        name="toolsPDFCheckBox";
00690        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/checkbox.png")), "", defKeys[name], mainWindow, name, modeInsertPDFCheckbox));
00691        name="toolsPDFComboBox";
00692        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/combobox.png")), "", defKeys[name], mainWindow, name, modeInsertPDFCombobox));
00693        name="toolsPDFListBox";
00694        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/list-box.png")), "", defKeys[name], mainWindow, name, modeInsertPDFListbox));
00695        name="toolsPDFAnnotText";
00696        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("22/pdf-annotations.png")), "", defKeys[name], mainWindow, name, modeInsertPDFTextAnnotation));
00697        name="toolsPDFAnnotLink";
00698        scrActions->insert(name, new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("goto.png")), "", defKeys[name], mainWindow, name, modeInsertPDFLinkAnnotation));
00699 
00700        (*scrActions)["toolsProperties"]->setToggleAction(true);
00701        (*scrActions)["toolsOutline"]->setToggleAction(true);
00702        (*scrActions)["toolsScrapbook"]->setToggleAction(true);
00703        (*scrActions)["toolsLayers"]->setToggleAction(true);
00704        (*scrActions)["toolsPages"]->setToggleAction(true);
00705        (*scrActions)["toolsBookmarks"]->setToggleAction(true);
00706        (*scrActions)["toolsMeasurements"]->setToggleAction(true);
00707        (*scrActions)["toolsActionHistory"]->setToggleAction(true);
00708        (*scrActions)["toolsPreflightVerifier"]->setToggleAction(true);
00709        (*scrActions)["toolsAlignDistribute"]->setToggleAction(true);
00710        (*scrActions)["toolsToolbarTools"]->setToggleAction(true);
00711        (*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
00712 
00713        (*scrActions)["toolsSelect"]->setToggleAction(true);
00714        (*scrActions)["toolsInsertTextFrame"]->setToggleAction(true);
00715        (*scrActions)["toolsInsertImageFrame"]->setToggleAction(true);
00716        (*scrActions)["toolsInsertTableFrame"]->setToggleAction(true);
00717        (*scrActions)["toolsInsertShape"]->setToggleAction(true);
00718        (*scrActions)["toolsInsertPolygon"]->setToggleAction(true);
00719        (*scrActions)["toolsInsertLine"]->setToggleAction(true);
00720        (*scrActions)["toolsInsertBezier"]->setToggleAction(true);
00721        (*scrActions)["toolsInsertFreehandLine"]->setToggleAction(true);
00722        (*scrActions)["toolsRotate"]->setToggleAction(true);
00723        (*scrActions)["toolsZoom"]->setToggleAction(true);
00724        (*scrActions)["toolsEditContents"]->setToggleAction(true);
00725        (*scrActions)["toolsEditWithStoryEditor"]->setToggleAction(true);
00726        (*scrActions)["toolsLinkTextFrame"]->setToggleAction(true);
00727        (*scrActions)["toolsUnlinkTextFrame"]->setToggleAction(true);
00728        (*scrActions)["toolsEyeDropper"]->setToggleAction(true);
00729        (*scrActions)["toolsCopyProperties"]->setToggleAction(true);
00730 
00731        (*scrActions)["toolsPDFPushButton"]->setToggleAction(true);
00732        (*scrActions)["toolsPDFTextField"]->setToggleAction(true);
00733        (*scrActions)["toolsPDFCheckBox"]->setToggleAction(true);
00734        (*scrActions)["toolsPDFComboBox"]->setToggleAction(true);
00735        (*scrActions)["toolsPDFListBox"]->setToggleAction(true);
00736        (*scrActions)["toolsPDFAnnotText"]->setToggleAction(true);
00737        (*scrActions)["toolsPDFAnnotLink"]->setToggleAction(true);
00738 
00739        *modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame" << "toolsInsertTableFrame";
00740        *modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertLine" << "toolsInsertBezier";
00741        *modeActionNames << "toolsInsertFreehandLine" << "toolsRotate" << "toolsZoom" << "toolsEditContents";
00742        *modeActionNames << "toolsEditWithStoryEditor" << "toolsLinkTextFrame" << "toolsUnlinkTextFrame";
00743        *modeActionNames << "toolsEyeDropper" << "toolsCopyProperties";
00744        *modeActionNames << "toolsPDFPushButton" << "toolsPDFTextField" << "toolsPDFCheckBox" << "toolsPDFComboBox" << "toolsPDFListBox" << "toolsPDFAnnotText" << "toolsPDFAnnotLink";
00745 
00746        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
00747               (*scrActions)[*it]->setEnabled(false);
00748 
00749 
00750        *nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
00751 
00752        connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoPalette(bool)) );
00753 
00754        connectModeActions();
00755 }
00756 
00757 void ActionManager::initExtrasMenuActions()
00758 {
00759        QString name;
00760        name="extrasManagePictures";
00761        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00762        name="extrasHyphenateText";
00763        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00764        name="extrasDeHyphenateText";
00765        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00766        name="extrasGenerateTableOfContents";
00767        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00768 
00769        connect( (*scrActions)["extrasManagePictures"], SIGNAL(activated()), mainWindow, SLOT(StatusPic()) );
00770        connect( (*scrActions)["extrasGenerateTableOfContents"], SIGNAL(activated()), mainWindow, SLOT(generateTableOfContents()) );
00771 }
00772 
00773 
00774 void ActionManager::initWindowsMenuActions()
00775 {
00776        QString name;
00777        name="windowsCascade";
00778        scrActions->insert(name, new ScrAction( QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00779        name="windowsTile";
00780        scrActions->insert(name, new ScrAction( QIconSet(noIcon),"", defKeys[name], mainWindow, name));
00781 }
00782 
00783 void ActionManager::initScriptMenuActions()
00784 {
00785 }
00786 
00787 void ActionManager::initHelpMenuActions()
00788 {
00789        QString name;
00790        name="helpAboutScribus";
00791        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00792        name="helpAboutPlugins";
00793        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00794        name="helpAboutQt";
00795        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00796        name="helpTooltips";
00797        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow, name));
00798        name="helpManual";
00799        scrActions->insert(name, new ScrAction(loadIcon("16/help-browser.png"), "", defKeys[name], mainWindow, name));
00800 
00801        (*scrActions)["helpTooltips"]->setToggleAction(true);
00802        (*scrActions)["helpTooltips"]->setOn(true);
00803 
00804        connect( (*scrActions)["helpAboutScribus"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAbout()) );
00805        connect( (*scrActions)["helpAboutPlugins"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAboutPlugins()) );
00806        connect( (*scrActions)["helpAboutQt"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAboutQt()) );
00807        connect( (*scrActions)["helpTooltips"], SIGNAL(activated()), mainWindow, SLOT(ToggleTips()) );
00808        connect( (*scrActions)["helpManual"], SIGNAL(activated()), mainWindow, SLOT(slotOnlineHelp()) );
00809 }
00810 
00811 void ActionManager::initUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, QWidget *actionParent, QStringList *actionNamesList)
00812 {
00813        QString name;
00814        //typography
00815        name="unicodeSmartHyphen";
00816        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSmartHyphen",SpecialChars::SHYPHEN.unicode()));
00817        name="unicodeNonBreakingHyphen";
00818        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeNonBreakingHyphen", SpecialChars::NBHYPHEN.unicode()));
00819        name="unicodeNonBreakingSpace";
00820        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeNonBreakingSpace",SpecialChars::NBSPACE.unicode()));
00821        name="unicodePageNumber";
00822        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodePageNumber",SpecialChars::PAGENUMBER.unicode()));
00823        //Spaces
00824        name="unicodeSpaceEN";
00825        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceEN",0x2002));
00826        name="unicodeSpaceEM";
00827        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceEM",0x2003));
00828        name="unicodeSpaceThin";
00829        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceThin",0x2009));
00830        name="unicodeSpaceThick";
00831        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceThick",0x2004));
00832        name="unicodeSpaceMid";
00833        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceMid",0x2005));
00834        name="unicodeSpaceHair";
00835        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSpaceHair",0x200A));
00836        //Breaks
00837        name="unicodeNewLine";
00838        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeNewLine",SpecialChars::LINEBREAK.unicode()));
00839        name="unicodeFrameBreak";
00840        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeFrameBreak",SpecialChars::FRAMEBREAK.unicode()));
00841        name="unicodeColumnBreak";
00842        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeColumnBreak",SpecialChars::COLBREAK.unicode()));
00843        name="unicodeZerowidthSpace";
00844        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeZerowidthSpace",SpecialChars::ZWSPACE.unicode()));
00845        name="unicodeZerowidthNonBreakingSpace";
00846        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeZerowidthNonBreakingSpace",SpecialChars::ZWNBSPACE.unicode()));
00847        //Special
00848        name="unicodeCopyRight";
00849        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeCopyRight",0x0A9));
00850        name="unicodeRegdTM";
00851        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeRegdTM",0x00AE));
00852        name="unicodeTM";
00853        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeTM",0x2122));
00854        name="unicodeBullet";
00855        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeBullet",0x2022));
00856        name="unicodeMidpoint";
00857        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeMidpoint",0x00B7));
00858        name="unicodeSolidus";
00859        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeSolidus",0x2044));
00860        //Dashes
00861        name="unicodeDashEm";
00862        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashEm",0x2014));
00863        name="unicodeDashEn";
00864        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashEn",0x2013));
00865        name="unicodeDashFigure";
00866        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashFigure",0x2012));
00867        name="unicodeDashQuotation";
00868        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeDashQuotation",0x2015));
00869        //Quotes
00870        name="unicodeQuoteApostrophe";
00871        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x0027));
00872        name="unicodeQuoteStraight";
00873        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x0022));
00874        name="unicodeQuoteSingleLeft";
00875        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x2018));
00876        name="unicodeQuoteSingleRight";
00877        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x2019));
00878        name="unicodeQuoteDoubleLeft";
00879        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201C));
00880        name="unicodeQuoteDoubleRight";
00881        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201D));
00882        name="unicodeQuoteSingleReversed";
00883        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201B));
00884        name="unicodeQuoteDoubleReversed";
00885        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x201F));
00886        name="unicodeQuoteSingleLeftGuillemet";
00887        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x2039));
00888        name="unicodeQuoteSingleRightGuillemet";
00889        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0x203A));
00890        name="unicodeQuoteDoubleLeftGuillemet";
00891        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteDoubleLeftGuillemet",0x00AB));
00892        name="unicodeQuoteDoubleRightGuillemet";
00893        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteDoubleRightGuillemet",0x00BB));
00894        name="unicodeQuoteLowSingleComma";
00895        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteLowSingleComma",0x201A));
00896        name="unicodeQuoteLowDoubleComma";
00897        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteLowDoubleComma",0x201E));
00898        name="unicodeQuoteCJKSingleLeft";
00899        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKSingleLeft",0x300C));
00900        name="unicodeQuoteCJKSingleRight";
00901        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKSingleRight",0x300D));
00902        name="unicodeQuoteCJKDoubleLeft";
00903        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKDoubleLeft",0x300E));
00904        name="unicodeQuoteCJKDoubleRight";
00905        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, "unicodeQuoteCJKDoubleRight",0x300F));
00906        //Ligatures
00907        name="unicodeLigature_ff";
00908        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB00));
00909        name="unicodeLigature_fi";
00910        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB01));
00911        name="unicodeLigature_fl";
00912        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB02));
00913        name="unicodeLigature_ffi";
00914        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB03));
00915        name="unicodeLigature_ffl";
00916        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB04));
00917        name="unicodeLigature_ft";
00918        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB05));
00919        name="unicodeLigature_st";
00920        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", defKeys[name], actionParent, name, 0xFB06));
00921 
00922        //Spaces and special characters
00923 
00924        *actionNamesList << "unicodeSmartHyphen" << "unicodeNonBreakingHyphen" << "unicodeNonBreakingSpace" << "unicodePageNumber";
00925        *actionNamesList << "unicodeSpaceEN" << "unicodeSpaceEM" << "unicodeSpaceThin" << "unicodeSpaceThick" << "unicodeSpaceMid" << "unicodeSpaceHair";
00926        //Breaks
00927        *actionNamesList << "unicodeNewLine" << "unicodeFrameBreak" << "unicodeColumnBreak" << "unicodeZerowidthSpace";
00928        //Copyrights and TMs
00929        *actionNamesList << "unicodeCopyRight" << "unicodeRegdTM" << "unicodeTM";
00930        //Slashes
00931        *actionNamesList << "unicodeSolidus";
00932        //Bullets
00933        *actionNamesList << "unicodeBullet" << "unicodeMidpoint";
00934        //Dashes
00935        *actionNamesList << "unicodeDashEm" << "unicodeDashEn" << "unicodeDashFigure" << "unicodeDashQuotation";
00936        //Straight quotes
00937        *actionNamesList << "unicodeQuoteApostrophe" << "unicodeQuoteStraight";
00938        //Double quotes
00939        *actionNamesList << "unicodeQuoteDoubleLeft" << "unicodeQuoteDoubleRight" << "unicodeQuoteSingleLeft" << "unicodeQuoteSingleRight";
00940        //Alternative single quotes
00941        *actionNamesList << "unicodeQuoteSingleReversed" << "unicodeQuoteDoubleReversed";
00942        //French quotes
00943        *actionNamesList << "unicodeQuoteSingleLeftGuillemet" << "unicodeQuoteSingleRightGuillemet" << "unicodeQuoteDoubleLeftGuillemet" << "unicodeQuoteDoubleRightGuillemet";
00944        //German quotes
00945        *actionNamesList << "unicodeQuoteLowSingleComma" << "unicodeQuoteLowDoubleComma";
00946        //CJK Quotes
00947        *actionNamesList << "unicodeQuoteCJKSingleLeft" << "unicodeQuoteCJKSingleRight" << "unicodeQuoteCJKDoubleLeft" << "unicodeQuoteCJKDoubleRight";
00948        //Ligatures
00949        *actionNamesList << "unicodeLigature_ff" << "unicodeLigature_fi" << "unicodeLigature_fl" << "unicodeLigature_ffi" << "unicodeLigature_ffl" << "unicodeLigature_ft" << "unicodeLigature_st";
00950        for ( QStringList::Iterator it = actionNamesList->begin(); it != actionNamesList->end(); ++it )
00951               connect( (*actionMap)[*it], SIGNAL(activatedUnicodeShortcut(const QString&, int)), actionParent, SLOT(specialActionKeyEvent(const QString&, int)) );
00952 }
00953 
00954 void ActionManager::initSpecialActions()
00955 {
00956        QString name;
00957        //GUI
00958        name="specialToggleAllPalettes";
00959        scrActions->insert(name, new ScrAction(ScrAction::DataQString, QIconSet(), "", defKeys[name], mainWindow, name, 0,0.0,name));
00960        name="specialToggleAllGuides";
00961        scrActions->insert(name, new ScrAction(ScrAction::DataQString, QIconSet(), "", defKeys[name], mainWindow, name, 0,0.0,name));
00962 
00963        connect( (*scrActions)["specialToggleAllPalettes"], SIGNAL(activated()), mainWindow, SLOT(ToggleAllPalettes()) );
00964        connect( (*scrActions)["specialToggleAllGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleAllGuides()) );
00965 }
00966 
00967 void ActionManager::disconnectModeActions()
00968 {
00969        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
00970               disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
00971 }
00972 
00973 void ActionManager::connectModeActions()
00974 {
00975        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
00976               connect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
00977 }
00978 
00979 void ActionManager::disconnectNewDocActions()
00980 {
00981        disconnect( (*scrActions)["itemAdjustFrameToImage"], 0, 0, 0 );
00982        disconnect( (*scrActions)["itemLock"], 0, 0, 0);
00983        disconnect( (*scrActions)["itemLockSize"], 0, 0, 0);
00984        disconnect( (*scrActions)["itemPrintingEnabled"], 0, 0, 0);
00985        disconnect( (*scrActions)["itemFlipH"], 0, 0, 0);
00986        disconnect( (*scrActions)["itemFlipV"], 0, 0, 0);
00987        disconnect( (*scrActions)["itemCombinePolygons"], 0, 0, 0);
00988        disconnect( (*scrActions)["itemSplitPolygons"], 0, 0, 0);
00989        disconnect( (*scrActions)["itemUpdateImage"], 0, 0, 0 );
00990        disconnect( (*scrActions)["itemDelete"], 0, 0, 0);
00991        disconnect( (*scrActions)["extrasHyphenateText"], 0, 0, 0 );
00992        disconnect( (*scrActions)["extrasDeHyphenateText"], 0, 0, 0 );
00993 
00994 }
00995 
00996 void ActionManager::connectNewDocActions(ScribusDoc *currDoc)
00997 {
00998        if (currDoc==NULL)
00999               return;
01000        connect( (*scrActions)["itemLock"], SIGNAL(activated()), currDoc, SLOT(itemSelection_ToggleLock()) );
01001        connect( (*scrActions)["itemLockSize"], SIGNAL(activated()), currDoc, SLOT(itemSelection_ToggleSizeLock()));
01002        connect( (*scrActions)["itemPrintingEnabled"], SIGNAL(activated()), currDoc, SLOT(itemSelection_TogglePrintEnabled()));
01003        connect( (*scrActions)["itemFlipH"], SIGNAL(activated()), currDoc, SLOT(itemSelection_FlipH()));
01004        connect( (*scrActions)["itemFlipV"], SIGNAL(activated()), currDoc, SLOT(itemSelection_FlipV()));
01005        connect( (*scrActions)["itemCombinePolygons"], SIGNAL(activated()), currDoc, SLOT(itemSelection_UniteItems()) );
01006        connect( (*scrActions)["itemSplitPolygons"], SIGNAL(activated()), currDoc, SLOT(itemSelection_SplitItems()) );
01007        connect( (*scrActions)["itemUpdateImage"], SIGNAL(activated()), currDoc, SLOT(updatePic()) );
01008        connect( (*scrActions)["extrasHyphenateText"], SIGNAL(activated()), currDoc, SLOT(itemSelection_DoHyphenate()) );
01009        connect( (*scrActions)["extrasDeHyphenateText"], SIGNAL(activated()), currDoc, SLOT(itemSelection_DoDeHyphenate()) );
01010        connect( (*scrActions)["itemDelete"], SIGNAL(activated()), currDoc, SLOT(itemSelection_DeleteItem()) );
01011        connect( (*scrActions)["itemAdjustFrameToImage"], SIGNAL(activated()), currDoc, SLOT(itemSelection_adjustFrametoImageSize()) );
01012 }
01013 
01014 void ActionManager::disconnectNewViewActions()
01015 {
01016 #ifdef HAVE_CAIRO
01017        disconnect( (*scrActions)["viewFitPreview"], 0, 0, 0);
01018 #endif
01019        disconnect( (*scrActions)["toolsZoomIn"], 0, 0, 0);
01020        disconnect( (*scrActions)["toolsZoomOut"], 0, 0, 0);
01021        disconnect( (*scrActions)["itemLowerToBottom"], 0, 0, 0);
01022        disconnect( (*scrActions)["itemImageIsVisible"], 0, 0, 0);
01023        disconnect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)), 0, 0 );
01024        disconnect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)), 0,0 );
01025        disconnect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)), 0, 0 );
01026        disconnect( (*scrActions)["itemRaise"], 0, 0, 0);
01027        disconnect( (*scrActions)["itemLower"], 0, 0, 0);
01028        disconnect( (*scrActions)["itemConvertToBezierCurve"], 0, 0, 0);
01029        disconnect( (*scrActions)["itemConvertToImageFrame"], 0, 0, 0);
01030        disconnect( (*scrActions)["itemConvertToOutlines"], 0, 0, 0);
01031        disconnect( (*scrActions)["itemConvertToPolygon"], 0, 0, 0);
01032        disconnect( (*scrActions)["itemConvertToTextFrame"], 0, 0, 0);
01033        disconnect( (*scrActions)["itemAttachTextToPath"], 0, 0, 0);
01034        disconnect( (*scrActions)["itemDetachTextFromPath"], 0, 0, 0);
01035        disconnect( (*scrActions)["itemExtendedImageProperties"], 0, 0, 0 );
01036 }
01037 
01038 void ActionManager::connectNewViewActions(ScribusView *currView)
01039 {
01040        if (currView==NULL)
01041               return;
01042 #ifdef HAVE_CAIRO
01043        connect( (*scrActions)["viewFitPreview"], SIGNAL(activated()), currView, SLOT(togglePreview()) );
01044 #endif
01045        connect( (*scrActions)["toolsZoomIn"], SIGNAL(activated()) , currView, SLOT(slotZoomIn()) );
01046        connect( (*scrActions)["toolsZoomOut"], SIGNAL(activated()) , currView, SLOT(slotZoomOut()) );
01047        connect( (*scrActions)["itemLowerToBottom"], SIGNAL(activated()), currView, SLOT(ToBack()) );
01048        connect( (*scrActions)["itemRaiseToTop"], SIGNAL(activated()), currView, SLOT(ToFront()) );
01049        connect( (*scrActions)["itemRaise"], SIGNAL(activated()), currView, SLOT(RaiseItem()) );
01050        connect( (*scrActions)["itemLower"], SIGNAL(activated()), currView, SLOT(LowerItem()) );
01051        connect( (*scrActions)["itemConvertToBezierCurve"], SIGNAL(activated()), currView, SLOT(ToBezierFrame()) );
01052        connect( (*scrActions)["itemConvertToImageFrame"], SIGNAL(activated()), currView, SLOT(ToPicFrame()) );
01053        connect( (*scrActions)["itemConvertToOutlines"], SIGNAL(activated()), currView, SLOT(TextToPath()) );
01054        connect( (*scrActions)["itemConvertToPolygon"], SIGNAL(activated()), currView, SLOT(ToPolyFrame()) );
01055        connect( (*scrActions)["itemConvertToTextFrame"], SIGNAL(activated()), currView, SLOT(ToTextFrame()) );
01056        connect( (*scrActions)["itemAttachTextToPath"], SIGNAL(activated()), currView, SLOT(ToPathText()) );
01057        connect( (*scrActions)["itemDetachTextFromPath"], SIGNAL(activated()), currView, SLOT(FromPathText()) );
01058        connect( (*scrActions)["itemExtendedImageProperties"], SIGNAL(activated()), currView, SLOT(editExtendedImageProperties()) );
01059 }
01060 
01061 void ActionManager::disconnectNewSelectionActions()
01062 {
01063        disconnect( (*scrActions)["itemImageIsVisible"], 0, 0, 0);
01064        //Only disconnect activatedData for data based actions or you will disconnect the internal signal
01065        disconnect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)) , 0, 0);
01066        disconnect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)) , 0, 0);
01067        disconnect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)) , 0, 0);
01068        disconnect( (*scrActions)["editClearContents"], 0, 0, 0);
01069 }
01070 
01071 void ActionManager::connectNewSelectionActions(ScribusView* /*currView*/, ScribusDoc* currDoc)
01072 {
01073        connect( (*scrActions)["itemImageIsVisible"], SIGNAL(toggled(bool)), currDoc, SLOT(itemSelection_ToggleImageShown()) );
01074        connect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)), currDoc, SLOT(itemSelection_ChangePreviewResolution(int)) );
01075        connect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)), currDoc, SLOT(itemSelection_ChangePreviewResolution(int)) );
01076        connect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)), currDoc, SLOT(itemSelection_ChangePreviewResolution(int)) );
01077        connect( (*scrActions)["editClearContents"], SIGNAL(activated()), currDoc, SLOT(itemSelection_ClearItem()) );
01078 }
01079 
01080 void ActionManager::saveActionShortcutsPreEditMode()
01081 {
01082        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
01083               (*scrActions)[*it]->saveShortcut();
01084        for ( QStringList::Iterator it = nonEditActionNames->begin(); it != nonEditActionNames->end(); ++it )
01085               (*scrActions)[*it]->saveShortcut();
01086 
01087 }
01088 
01089 void ActionManager::restoreActionShortcutsPostEditMode()
01090 {
01091        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
01092               (*scrActions)[*it]->restoreShortcut();
01093        for ( QStringList::Iterator it = nonEditActionNames->begin(); it != nonEditActionNames->end(); ++it )
01094               (*scrActions)[*it]->restoreShortcut();
01095 }
01096 
01097 void ActionManager::enableActionStringList(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, QStringList *list, bool enabled, bool checkingUnicode, const QString& fontName)
01098 {
01099        for ( QStringList::Iterator it = list->begin(); it != list->end(); ++it )
01100        {
01101               if(!checkingUnicode)
01102                      (*actionMap)[*it]->setEnabled(enabled);
01103               else
01104               {
01105                      //For UnicodeChar actions, only enable when the current font has that character.
01106                      if (mainWindow->HaveDoc && (*actionMap)[*it]->actionType()==ScrAction::UnicodeChar)
01107                      {
01108                             int charCode=(*actionMap)[*it]->actionInt();
01109                             if(charCode==-1 ||
01110                                    charCode==24 ||
01111                                    charCode==26 ||
01112                                    charCode==27 ||
01113                                    charCode==28 ||
01114                                    charCode==29 ||
01115                                    charCode==30 ||
01116                                    ((*mainWindow->doc->AllFonts)[fontName].usable() &&
01117                                    (*mainWindow->doc->AllFonts)[fontName].canRender(charCode)) )
01118                                           (*actionMap)[*it]->setEnabled(true);
01119                             else
01120                                    (*actionMap)[*it]->setEnabled(false);
01121                      }
01122               }
01123        }
01124 }
01125 
01126 void ActionManager::enableUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, bool enabled, const QString& fontName)
01127 {
01128        enableActionStringList(actionMap, unicodeCharActionNames, enabled, enabled, fontName);
01129        (*actionMap)["insertGlyph"]->setEnabled(enabled);
01130 }
01131 
01132 void ActionManager::setPDFActions(ScribusView *currView)
01133 {
01134        if (currView==NULL)
01135               return;
01136        PageItem* currItem = mainWindow->doc->m_Selection->itemAt(0);
01137        if (currItem==NULL)
01138               return;
01139 
01140        disconnect( (*scrActions)["itemPDFIsBookmark"], 0, 0, 0);
01141        disconnect( (*scrActions)["itemPDFIsAnnotation"], 0, 0, 0);
01142 
01143        if (!currItem->asTextFrame())
01144        {
01145               (*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
01146               (*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
01147               (*scrActions)["itemPDFIsAnnotation"]->setOn(false);
01148               (*scrActions)["itemPDFIsBookmark"]->setOn(false);
01149               (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
01150               (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
01151               return;
01152        }
01153 
01154        (*scrActions)["itemPDFIsAnnotation"]->setEnabled(true);
01155        (*scrActions)["itemPDFIsBookmark"]->setEnabled(true);
01156        (*scrActions)["itemPDFIsAnnotation"]->setOn(currItem->isAnnotation());
01157        (*scrActions)["itemPDFIsBookmark"]->setOn(currItem->isBookmark);
01158        if (currItem->isAnnotation())
01159        {
01160               int aType=currItem->annotation().Type();
01161               bool setter=((aType == 0) || (aType == 1) || (aType > 9));
01162               (*scrActions)["itemPDFAnnotationProps"]->setEnabled(setter);
01163               (*scrActions)["itemPDFFieldProps"]->setEnabled(!setter);
01164        }
01165        else
01166        {
01167               (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
01168               (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
01169        }
01170        connect( (*scrActions)["itemPDFIsAnnotation"], SIGNAL(activated()), currView, SLOT(ToggleAnnotation()) );
01171        connect( (*scrActions)["itemPDFIsBookmark"], SIGNAL(activated()), currView, SLOT(ToggleBookmark()) );
01172 }
01173 
01174 void ActionManager::languageChange()
01175 {
01176        //File Menu
01177        (*scrActions)["fileNew"]->setTexts( tr("&New"));
01178        (*scrActions)["fileOpen"]->setTexts( tr("&Open..."));
01179        (*scrActions)["fileClose"]->setTexts( tr("&Close"));
01180        (*scrActions)["fileSave"]->setTexts( tr("&Save"));
01181        (*scrActions)["fileSaveAs"]->setTexts( tr("Save &As..."));
01182        (*scrActions)["fileRevert"]->setTexts( tr("Re&vert to Saved"));
01183        (*scrActions)["fileCollect"]->setTexts( tr("Collect for O&utput..."));
01184        (*scrActions)["fileImportText"]->setTexts( tr("Get Text..."));
01185        (*scrActions)["fileImportAppendText"]->setTexts( tr("Append &Text..."));
01186        (*scrActions)["fileImportImage"]->setTexts( tr("Get Image..."));
01187        (*scrActions)["fileExportText"]->setTexts( tr("Save &Text..."));
01188        (*scrActions)["fileExportAsEPS"]->setTexts( tr("Save as &EPS..."));
01189        (*scrActions)["fileExportAsPDF"]->setTexts( tr("Save as P&DF..."));
01190        (*scrActions)["fileDocSetup"]->setTexts( tr("Document &Setup..."));
01191        (*scrActions)["filePreferences"]->setTexts( tr("P&references..."));
01192        (*scrActions)["filePrint"]->setTexts( tr("&Print..."));
01193        (*scrActions)["PrintPreview"]->setTexts( tr("Print Previe&w"));
01194        (*scrActions)["fileQuit"]->setTexts( tr("&Quit"));
01195        //Edit Menu
01196        (*scrActions)["editUndoAction"]->setTexts( tr("&Undo"));
01197        (*scrActions)["editRedoAction"]->setTexts( tr("&Redo"));
01198        (*scrActions)["editActionMode"]->setTexts( tr("&Item Action Mode"));
01199        (*scrActions)["editCut"]->setTexts( tr("Cu&t"));
01200        (*scrActions)["editCopy"]->setTexts( tr("&Copy"));
01201        (*scrActions)["editPaste"]->setTexts( tr("&Paste"));
01202        (*scrActions)["editCopyContents"]->setTexts( tr("&Copy"));
01203        (*scrActions)["editPasteContents"]->setTexts( tr("&Paste"));
01204        (*scrActions)["editPasteContentsAbs"]->setTexts( tr("Paste (&Absolute)"));
01205        (*scrActions)["editClearContents"]->setTexts( tr("C&lear"));
01206        (*scrActions)["editSelectAll"]->setTexts( tr("Select &All"));
01207        (*scrActions)["editDeselectAll"]->setTexts( tr("&Deselect All"));
01208        (*scrActions)["editSearchReplace"]->setTexts( tr("&Search/Replace..."));
01209        (*scrActions)["editEditWithImageEditor"]->setTexts( tr("Edit Image..."));
01210        (*scrActions)["editColors"]->setTexts( tr("C&olors..."));
01211        (*scrActions)["editPatterns"]->setTexts( tr("Patterns..."));
01212        (*scrActions)["editStyles"]->setTexts( tr("S&tyles..."));
01213        (*scrActions)["editMasterPages"]->setTexts( tr("&Master Pages..."));
01214        (*scrActions)["editJavascripts"]->setTexts( tr("&JavaScripts..."));
01215 
01216        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
01217        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
01218        for (uint s = 0; s < f_size; ++s)
01219        {
01220               QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
01221               (*scrActions)[fontSizeName]->setTexts( tr("%1 pt").arg(font_sizes[s]));
01222        }
01223        (*scrActions)["fontSizeOther"]->setTexts( tr("&Other..."));
01224        (*scrActions)["alignLeft"]->setTexts( tr("&Left"));
01225        (*scrActions)["alignCenter"]->setTexts( tr("&Center"));
01226        (*scrActions)["alignRight"]->setTexts( tr("&Right"));
01227        (*scrActions)["alignBlock"]->setTexts( tr("&Block"));
01228        (*scrActions)["alignForced"]->setTexts( tr("&Forced"));
01229 
01230        for (uint i=0; i<=100 ; i+=10)
01231        {
01232               QString shadeName=QString("shade%1").arg(i);
01233               (*scrActions)[shadeName]->setTexts( tr("&%1 %").arg(i));
01234        }
01235 
01236        (*scrActions)["shadeOther"]->setTexts( tr("&Other..."));
01237        (*scrActions)["typeEffectNormal"]->setTexts( tr("&Normal"));
01238        (*scrActions)["typeEffectUnderline"]->setTexts( tr("&Underline"));
01239        (*scrActions)["typeEffectUnderlineWords"]->setTexts( tr("Underline &Words"));
01240        (*scrActions)["typeEffectStrikeThrough"]->setTexts( tr("&Strike Through"));
01241        (*scrActions)["typeEffectAllCaps"]->setTexts( tr("&All Caps"));
01242        (*scrActions)["typeEffectSmallCaps"]->setTexts( tr("Small &Caps"));
01243        (*scrActions)["typeEffectSuperscript"]->setTexts( tr("Su&perscript"));
01244        (*scrActions)["typeEffectSubscript"]->setTexts( tr("Su&bscript"));
01245        (*scrActions)["typeEffectOutline"]->setTexts( tr("&Outline", "type effect"));
01246        (*scrActions)["typeEffectShadow"]->setTexts( tr("S&hadow"));
01247 
01248        (*scrActions)["styleImageEffects"]->setTexts( tr("&Image Effects"));
01249        (*scrActions)["styleTabulators"]->setTexts( tr("&Tabulators..."));
01250 
01251        //Item Menu
01252        (*scrActions)["itemDuplicate"]->setTexts( tr("D&uplicate"));
01253        (*scrActions)["itemMulDuplicate"]->setTexts( tr("&Multiple Duplicate"));
01254        (*scrActions)["itemDelete"]->setTexts( tr("&Delete"));
01255        (*scrActions)["itemGroup"]->setTexts( tr("&Group"));
01256        (*scrActions)["itemUngroup"]->setTexts( tr("&Ungroup"));
01257        (*scrActions)["itemLock"]->setTexts( tr("Is &Locked"));
01258        (*scrActions)["itemLockSize"]->setTexts( tr("Si&ze is Locked"));
01259        (*scrActions)["itemPrintingEnabled"]->setTexts( tr("&Printing Enabled"));
01260        (*scrActions)["itemFlipH"]->setTexts( tr("&Flip Horizontally"));
01261        (*scrActions)["itemFlipV"]->setTexts( tr("&Flip Vertically"));
01262        (*scrActions)["itemLowerToBottom"]->setTexts( tr("Lower to &Bottom"));
01263        (*scrActions)["itemRaiseToTop"]->setTexts( tr("Raise to &Top"));
01264        (*scrActions)["itemLower"]->setTexts( tr("&Lower"));
01265        (*scrActions)["itemRaise"]->setTexts( tr("&Raise"));
01266        (*scrActions)["itemSendToScrapbook"]->setTexts( tr("Send to S&crapbook"));
01267        (*scrActions)["itemSendToPattern"]->setTexts( tr("Send to Patterns"));
01268        (*scrActions)["itemAttributes"]->setTexts( tr("&Attributes..."));
01269        (*scrActions)["itemImageInfo"]->setTexts( tr("More Info..."));
01270        (*scrActions)["itemImageIsVisible"]->setTexts( tr("I&mage Visible"));
01271        (*scrActions)["itemUpdateImage"]->setTexts( tr("&Update Image"));
01272        (*scrActions)["itemAdjustFrameToImage"]->setTexts( tr("Adjust Frame to Image"));
01273        (*scrActions)["itemExtendedImageProperties"]->setTexts( tr("Extended Image Properties"));
01274        (*scrActions)["itemPreviewLow"]->setTexts( tr("&Low Resolution"));
01275        (*scrActions)["itemPreviewNormal"]->setTexts( tr("&Normal Resolution"));
01276        (*scrActions)["itemPreviewFull"]->setTexts( tr("&Full Resolution"));
01277        (*scrActions)["itemPDFIsBookmark"]->setTexts( tr("Is PDF &Bookmark"));
01278        (*scrActions)["itemPDFIsAnnotation"]->setTexts( tr("Is PDF A&nnotation"));
01279        (*scrActions)["itemPDFAnnotationProps"]->setTexts( tr("Annotation P&roperties"));
01280        (*scrActions)["itemPDFFieldProps"]->setTexts( tr("Field P&roperties"));
01281        (*scrActions)["itemShapeEdit"]->setTexts( tr("&Edit Shape..."));
01282        (*scrActions)["itemAttachTextToPath"]->setTexts( tr("&Attach Text to Path"));
01283        (*scrActions)["itemDetachTextFromPath"]->setTexts( tr("&Detach Text from Path"));
01284        (*scrActions)["itemCombinePolygons"]->setTexts( tr("&Combine Polygons"));
01285        (*scrActions)["itemSplitPolygons"]->setTexts( tr("Split &Polygons"));
01286        (*scrActions)["itemConvertToBezierCurve"]->setTexts( tr("&Bezier Curve"));
01287        (*scrActions)["itemConvertToImageFrame"]->setTexts( tr("&Image Frame"));
01288        (*scrActions)["itemConvertToOutlines"]->setTexts( tr("&Outlines", "Convert to oulines"));
01289        (*scrActions)["itemConvertToPolygon"]->setTexts( tr("&Polygon"));
01290        (*scrActions)["itemConvertToTextFrame"]->setTexts( tr("&Text Frame"));
01291 
01292        //Insert Menu
01293        (*scrActions)["insertFrame"]->setTexts( tr("&Frame..."));
01294        (*scrActions)["insertGlyph"]->setTexts( tr("&Glyph..."));
01295        (*scrActions)["insertSampleText"]->setTexts( tr("Sample Text"));
01296        (*scrActions)["stickyTools"]->setTexts( tr("Sticky Tools"));
01297 
01298        //Page menu
01299        (*scrActions)["pageInsert"]->setTexts( tr("&Insert..."));
01300        (*scrActions)["pageImport"]->setTexts( tr("Im&port..."));
01301        (*scrActions)["pageDelete"]->setTexts( tr("&Delete..."));
01302        (*scrActions)["pageCopy"]->setTexts( tr("&Copy..."));
01303        (*scrActions)["pageMove"]->setTexts( tr("&Move..."));
01304        (*scrActions)["pageApplyMasterPage"]->setTexts( tr("&Apply Master Page..."));
01305        (*scrActions)["pageCopyToMasterPage"]->setTexts( tr("Convert to Master Page..."));
01306        (*scrActions)["pageManageGuides"]->setTexts( tr("Manage &Guides..."));
01307        (*scrActions)["pageManageMargins"]->setTexts( tr("Manage Page Properties..."));
01308 
01309        //View Menu
01310        (*scrActions)["viewFitInWindow"]->setTexts( tr("&Fit to Height"));
01311        (*scrActions)["viewFitWidth"]->setTexts( tr("Fit to Width"));
01312        (*scrActions)["viewFit50"]->setTexts( tr("&50%"));
01313        (*scrActions)["viewFit75"]->setTexts( tr("&75%"));
01314        (*scrActions)["viewFit100"]->setTexts( tr("&100%"));
01315        (*scrActions)["viewFit200"]->setTexts( tr("&200%"));
01316 #ifdef HAVE_CAIRO
01317        (*scrActions)["viewFitPreview"]->setTexts( tr("Preview Mode"));
01318 #else
01319        (*scrActions)["viewFitPreview"]->setTexts( tr("&Thumbnails"));
01320 #endif
01321        (*scrActions)["viewShowMargins"]->setTexts( tr("Show &Margins"));
01322        (*scrActions)["viewShowBleeds"]->setTexts( tr("Show Bleeds"));
01323        (*scrActions)["viewShowFrames"]->setTexts( tr("Show &Frames"));
01324        (*scrActions)["viewShowLayerMarkers"]->setTexts( tr("Show Layer Indicators"));
01325        (*scrActions)["viewShowImages"]->setTexts( tr("Show &Images"));
01326        (*scrActions)["viewShowGrid"]->setTexts( tr("Show &Grid"));
01327        (*scrActions)["viewShowGuides"]->setTexts( tr("Show G&uides"));
01328        (*scrActions)["viewShowColumnBorders"]->setTexts( tr("Show Text Frame Columns"));
01329        (*scrActions)["viewShowBaseline"]->setTexts( tr("Show &Baseline Grid"));
01330        (*scrActions)["viewShowTextChain"]->setTexts( tr("Show &Text Chain"));
01331        (*scrActions)["viewShowTextControls"]->setTexts( tr("Show Control Characters"));
01332        (*scrActions)["viewShowRulers"]->setTexts( tr("Show Rulers"));
01333        (*scrActions)["viewRulerMode"]->setTexts( tr("Rulers relative to Page"));
01334        (*scrActions)["viewSnapToGrid"]->setTexts( tr("Sn&ap to Grid"));
01335        (*scrActions)["viewSnapToGuides"]->setTexts( tr("Sna&p to Guides"));
01336 //     (*scrActions)["viewNewView"]->setTexts( tr("New View"));
01337 
01338        //Tool menu
01339        (*scrActions)["toolsProperties"]->setTexts( tr("&Properties"));
01340        (*scrActions)["toolsOutline"]->setTexts( tr("&Outline", "Document Outline Palette"));
01341        (*scrActions)["toolsScrapbook"]->setTexts( tr("&Scrapbook"));
01342        (*scrActions)["toolsLayers"]->setTexts( tr("&Layers"));
01343        (*scrActions)["toolsPages"]->setTexts( tr("&Arrange Pages"));
01344        (*scrActions)["toolsBookmarks"]->setTexts( tr("&Bookmarks"));
01345        (*scrActions)["toolsMeasurements"]->setTexts( tr("&Measurements"));
01346        (*scrActions)["toolsActionHistory"]->setTexts( tr("Action &History"));
01347        (*scrActions)["toolsPreflightVerifier"]->setTexts( tr("Preflight &Verifier"));
01348        (*scrActions)["toolsAlignDistribute"]->setTexts( tr("&Align and Distribute"));
01349        (*scrActions)["toolsToolbarTools"]->setTexts( tr("&Tools"));
01350        (*scrActions)["toolsToolbarPDF"]->setTexts( tr("P&DF Tools"));
01351 
01352        //toolbar only items
01353        (*scrActions)["toolsSelect"]->setTexts( tr("Select Item"));
01354        (*scrActions)["toolsInsertTextFrame"]->setMenuText( tr("&Text Frame"));
01355        (*scrActions)["toolsInsertImageFrame"]->setMenuText( tr("&Image Frame"));
01356        (*scrActions)["toolsInsertTableFrame"]->setMenuText( tr("T&able"));
01357        (*scrActions)["toolsInsertShape"]->setMenuText( tr("&Shape"));
01358        (*scrActions)["toolsInsertPolygon"]->setMenuText( tr("&Polygon"));
01359        (*scrActions)["toolsInsertLine"]->setMenuText( tr("&Line"));
01360        (*scrActions)["toolsInsertBezier"]->setMenuText( tr("&Bezier Curve"));
01361        (*scrActions)["toolsInsertFreehandLine"]->setMenuText( tr("&Freehand Line"));
01362        (*scrActions)["toolsRotate"]->setTexts( tr("Rotate Item"));
01363        (*scrActions)["toolsZoom"]->setTexts( tr("Zoom in or out"));
01364        (*scrActions)["toolsZoomIn"]->setTexts( tr("Zoom in"));
01365        (*scrActions)["toolsZoomOut"]->setTexts( tr("Zoom out"));
01366        (*scrActions)["toolsEditContents"]->setTexts( tr("Edit Contents of Frame"));
01367        (*scrActions)["toolsEditWithStoryEditor"]->setMenuText( tr("Edit Text..."));
01368        (*scrActions)["toolsLinkTextFrame"]->setTexts( tr("Link Text Frames"));
01369        (*scrActions)["toolsUnlinkTextFrame"]->setTexts( tr("Unlink Text Frames"));
01370        (*scrActions)["toolsEyeDropper"]->setTexts( tr("&Eye Dropper"));
01371        (*scrActions)["toolsCopyProperties"]->setTexts( tr("Copy Item Properties"));
01372 
01373        (*scrActions)["toolsEditWithStoryEditor"]->setText( tr("Edit the text with the Story Editor"));
01374 
01375        (*scrActions)["toolsInsertTextFrame"]->setText( tr("Insert Text Frame"));
01376        (*scrActions)["toolsInsertImageFrame"]->setText( tr("Insert Image Frame"));
01377        (*scrActions)["toolsInsertTableFrame"]->setText( tr("Insert Table"));
01378        (*scrActions)["toolsInsertShape"]->setText( tr("Insert Shape"));
01379        (*scrActions)["toolsInsertPolygon"]->setText( tr("Insert Polygon"));
01380        (*scrActions)["toolsInsertLine"]->setText( tr("Insert Line"));
01381        (*scrActions)["toolsInsertBezier"]->setText( tr("Insert Bezier Curve"));
01382        (*scrActions)["toolsInsertFreehandLine"]->setText( tr("Insert Freehand Line"));
01383 
01384        (*scrActions)["toolsPDFPushButton"]->setTexts( tr("Insert PDF Push Button"));
01385        (*scrActions)["toolsPDFTextField"]->setTexts( tr("Insert PDF Text Field"));
01386        (*scrActions)["toolsPDFCheckBox"]->setTexts( tr("Insert PDF Check Box"));
01387        (*scrActions)["toolsPDFComboBox"]->setTexts( tr("Insert PDF Combo Box"));
01388        (*scrActions)["toolsPDFListBox"]->setTexts( tr("Insert PDF List Box"));
01389        (*scrActions)["toolsPDFAnnotText"]->setTexts( tr("Insert Text Annotation"));
01390        (*scrActions)["toolsPDFAnnotLink"]->setTexts( tr("Insert Link Annotation"));
01391 
01392 
01393        //Extras Menu
01394        (*scrActions)["extrasManagePictures"]->setTexts( tr("&Manage Pictures"));
01395        (*scrActions)["extrasHyphenateText"]->setTexts( tr("&Hyphenate Text"));
01396        (*scrActions)["extrasDeHyphenateText"]->setTexts( tr("Dehyphenate Text"));
01397        (*scrActions)["extrasGenerateTableOfContents"]->setTexts( tr("&Generate Table Of Contents"));
01398 
01399        //Windows Menu
01400        (*scrActions)["windowsCascade"]->setMenuText( tr("&Cascade"));
01401        (*scrActions)["windowsTile"]->setMenuText( tr("&Tile"));
01402 
01403        //Help Menu
01404        (*scrActions)["helpAboutScribus"]->setTexts( tr("&About Scribus"));
01405        (*scrActions)["helpAboutPlugins"]->setTexts( tr("&About Plug-ins"));
01406        (*scrActions)["helpAboutQt"]->setTexts( tr("About &Qt"));
01407        (*scrActions)["helpTooltips"]->setTexts( tr("Toolti&ps"));
01408        (*scrActions)["helpManual"]->setTexts( tr("Scribus &Manual..."));
01409 
01410        //GUI
01411        (*scrActions)["specialToggleAllPalettes"]->setTexts( tr("Toggle Palettes"));
01412        (*scrActions)["specialToggleAllGuides"]->setTexts( tr("Toggle Guides"));
01413 
01414        languageChangeUnicodeActions(scrActions);
01415 }
01416 
01417 void ActionManager::languageChangeUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap)
01418 {
01419        //typography
01420        (*actionMap)["unicodeSmartHyphen"]->setMenuText( tr("Smart &Hyphen"));
01421        (*actionMap)["unicodeNonBreakingHyphen"]->setMenuText( tr("Non Breaking Dash"));
01422        (*actionMap)["unicodeNonBreakingSpace"]->setMenuText( tr("Non Breaking &Space"));
01423        (*actionMap)["unicodePageNumber"]->setMenuText( tr("Page &Number"));
01424        (*actionMap)["unicodeNewLine"]->setMenuText( tr("New Line"));
01425        (*actionMap)["unicodeFrameBreak"]->setMenuText( tr("Frame Break"));
01426        (*actionMap)["unicodeColumnBreak"]->setMenuText( tr("Column Break"));
01427        (*actionMap)["unicodeZerowidthSpace"]->setMenuText( tr("&Zero Width Space"));
01428        (*actionMap)["unicodeZerowidthNonBreakingSpace"]->setMenuText( tr("Zero Width NB Space"));
01429        (*actionMap)["unicodeCopyRight"]->setTexts( tr("Copyright"));
01430        (*actionMap)["unicodeRegdTM"]->setTexts( tr("Registered Trademark"));
01431        (*actionMap)["unicodeTM"]->setTexts( tr("Trademark"));
01432        (*actionMap)["unicodeSolidus"]->setTexts( tr("Solidus"));
01433        (*actionMap)["unicodeBullet"]->setTexts( tr("Bullet"));
01434        (*actionMap)["unicodeMidpoint"]->setTexts( tr("Middle Dot"));
01435        (*actionMap)["unicodeDashEm"]->setTexts( tr("Em Dash"));
01436        (*actionMap)["unicodeDashEn"]->setTexts( tr("En Dash"));
01437        (*actionMap)["unicodeDashFigure"]->setTexts( tr("Figure Dash"));
01438        (*actionMap)["unicodeDashQuotation"]->setTexts( tr("Quotation Dash"));
01439 
01440        (*actionMap)["unicodeQuoteApostrophe"]->setTexts( tr("Apostrophe", "Unicode 0x0027"));
01441        (*actionMap)["unicodeQuoteStraight"]->setTexts( tr("Straight Double", "Unicode 0x0022"));
01442        (*actionMap)["unicodeQuoteSingleLeft"]->setTexts( tr("Single Left", "Unicode 0x2018"));
01443        (*actionMap)["unicodeQuoteSingleRight"]->setTexts( tr("Single Right", "Unicode 0x2019"));
01444        (*actionMap)["unicodeQuoteDoubleLeft"]->setTexts( tr("Double Left", "Unicode 0x201C"));
01445        (*actionMap)["unicodeQuoteDoubleRight"]->setTexts( tr("Double Right", "Unicode 0x201D"));
01446        (*actionMap)["unicodeQuoteSingleReversed"]->setTexts( tr("Single Reversed", "Unicode 0x201B"));
01447        (*actionMap)["unicodeQuoteDoubleReversed"]->setTexts( tr("Double Reversed", "Unicode 0x201F"));
01448        (*actionMap)["unicodeQuoteSingleLeftGuillemet"]->setTexts( tr("Single Left Guillemet", "Unicode 0x2039"));
01449        (*actionMap)["unicodeQuoteSingleRightGuillemet"]->setTexts( tr("Single Right Guillemet", "Unicode 0x203A"));
01450        (*actionMap)["unicodeQuoteDoubleLeftGuillemet"]->setTexts( tr("Double Left Guillemet", "Unicode 0x00AB"));
01451        (*actionMap)["unicodeQuoteDoubleRightGuillemet"]->setTexts( tr("Double Right Guillemet", "Unicode 0x00BB"));
01452        (*actionMap)["unicodeQuoteLowSingleComma"]->setTexts( tr("Low Single Comma", "Unicode 0x201A"));
01453        (*actionMap)["unicodeQuoteLowDoubleComma"]->setTexts( tr("Low Double Comma", "Unicode 0x201E"));
01454        (*actionMap)["unicodeQuoteCJKSingleLeft"]->setTexts( tr("CJK Single Left", "Unicode 0x300C"));
01455        (*actionMap)["unicodeQuoteCJKSingleRight"]->setTexts( tr("CJK Single Right", "Unicode 0x300D"));
01456        (*actionMap)["unicodeQuoteCJKDoubleLeft"]->setTexts( tr("CJK Double Left", "Unicode 0x300E"));
01457        (*actionMap)["unicodeQuoteCJKDoubleRight"]->setTexts( tr("CJK Double Right", "Unicode 0x300F"));
01458        
01459        (*actionMap)["unicodeSpaceEN"]->setTexts( tr("En Space"));
01460        (*actionMap)["unicodeSpaceEM"]->setTexts( tr("Em Space"));
01461        (*actionMap)["unicodeSpaceThin"]->setTexts( tr("Thin Space"));
01462        (*actionMap)["unicodeSpaceThick"]->setTexts( tr("Thick Space"));
01463        (*actionMap)["unicodeSpaceMid"]->setTexts( tr("Mid Space"));
01464        (*actionMap)["unicodeSpaceHair"]->setTexts( tr("Hair Space"));
01465 
01466        (*actionMap)["unicodeSmartHyphen"]->setText( tr("Insert Smart Hyphen"));
01467        (*actionMap)["unicodeNonBreakingHyphen"]->setText( tr("Insert Non Breaking Dash"));
01468        (*actionMap)["unicodeNonBreakingSpace"]->setText( tr("Insert Non Breaking Space"));
01469        (*actionMap)["unicodePageNumber"]->setText( tr("Insert Page Number"));
01470        (*actionMap)["unicodeNewLine"]->setText( tr("New Line"));
01471        (*actionMap)["unicodeFrameBreak"]->setText( tr("Frame Break"));
01472        (*actionMap)["unicodeColumnBreak"]->setText( tr("Column Break"));
01473        (*actionMap)["unicodeZerowidthSpace"]->setText( tr("&Zero Width Space"));
01474        (*actionMap)["unicodeZerowidthNonBreakingSpace"]->setText( tr("Zero Width NB Space"));
01475 
01476        (*actionMap)["unicodeLigature_ff"]->setTexts( tr("ff"));
01477        (*actionMap)["unicodeLigature_fi"]->setTexts( tr("fi"));
01478        (*actionMap)["unicodeLigature_fl"]->setTexts( tr("fl"));
01479        (*actionMap)["unicodeLigature_ffi"]->setTexts( tr("ffi"));
01480        (*actionMap)["unicodeLigature_ffl"]->setTexts( tr("ffl"));
01481        (*actionMap)["unicodeLigature_ft"]->setTexts( tr("ft"));
01482        (*actionMap)["unicodeLigature_st"]->setTexts( tr("st"));
01483 }
01484 
01485 void ActionManager::createDefaultShortcuts()
01486 {
01487        defKeys.clear();
01488 
01489        defKeys.insert("fileNew", Qt::CTRL+Qt::Key_N);
01490        defKeys.insert("fileOpen", Qt::CTRL+Qt::Key_O);
01491        defKeys.insert("fileClose", Qt::CTRL+Qt::Key_W);
01492        defKeys.insert("fileSave", Qt::CTRL+Qt::Key_S);
01493        defKeys.insert("fileSaveAs", Qt::CTRL+Qt::SHIFT+Qt::Key_S);
01494        defKeys.insert("fileRevert", QKeySequence());
01495        defKeys.insert("fileCollect", QKeySequence());
01496        defKeys.insert("fileImportText", Qt::CTRL+Qt::Key_D);
01497        defKeys.insert("fileImportAppendText", QKeySequence());
01498        defKeys.insert("fileImportImage", Qt::CTRL+Qt::Key_D);
01499        defKeys.insert("fileExportText", QKeySequence());
01500        defKeys.insert("fileExportAsEPS", QKeySequence());
01501        defKeys.insert("fileExportAsPDF", QKeySequence());
01502        defKeys.insert("fileDocSetup", QKeySequence());
01503        defKeys.insert("filePreferences", QKeySequence());
01504        defKeys.insert("filePrint", Qt::CTRL+Qt::Key_P);
01505        defKeys.insert("PrintPreview", Qt::CTRL+Qt::ALT+Qt::Key_P);
01506        defKeys.insert("fileQuit", Qt::CTRL+Qt::Key_Q);
01507        //Edit Menu
01508        defKeys.insert("editUndoAction", Qt::CTRL+Qt::Key_Z);
01509        defKeys.insert("editRedoAction", Qt::CTRL+Qt::SHIFT+Qt::Key_Z);
01510        defKeys.insert("editActionMode", QKeySequence());
01511        defKeys.insert("editCut", Qt::CTRL+Qt::Key_X);
01512        defKeys.insert("editCopy", Qt::CTRL+Qt::Key_C);
01513        defKeys.insert("editPaste", Qt::CTRL+Qt::Key_V);
01514        defKeys.insert("editCopyContents", Qt::CTRL+Qt::SHIFT+Qt::Key_C);
01515        defKeys.insert("editPasteContents", Qt::CTRL+Qt::SHIFT+Qt::Key_V);
01516        defKeys.insert("editPasteContentsAbs", Qt::CTRL+Qt::ALT+Qt::SHIFT+Qt::Key_V);
01517        defKeys.insert("editClearContents", QKeySequence());
01518        defKeys.insert("editSelectAll", Qt::CTRL+Qt::Key_A);
01519        defKeys.insert("editDeselectAll", Qt::CTRL+Qt::SHIFT+Qt::Key_A);
01520        defKeys.insert("editSearchReplace", Qt::CTRL+Qt::Key_F);
01521        defKeys.insert("editEditWithImageEditor", QKeySequence());
01522        defKeys.insert("editColors", QKeySequence());
01523        defKeys.insert("editPatterns", QKeySequence());
01524        defKeys.insert("editStyles", QKeySequence(Qt::Key_F3));
01525        defKeys.insert("editMasterPages", QKeySequence());
01526        defKeys.insert("editJavascripts", QKeySequence());
01527 
01528        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
01529        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
01530        for (uint s = 0; s < f_size; ++s)
01531        {
01532               QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
01533               defKeys.insert(fontSizeName, QKeySequence());
01534        }
01535        defKeys.insert("fontSizeOther", QKeySequence());
01536        defKeys.insert("alignLeft", QKeySequence());
01537        defKeys.insert("alignCenter", QKeySequence());
01538        defKeys.insert("alignRight", QKeySequence());
01539        defKeys.insert("alignBlock", QKeySequence());
01540        defKeys.insert("alignForced", QKeySequence());
01541 
01542        for (uint i=0; i<=100 ; i+=10)
01543        {
01544               QString shadeName=QString("shade%1").arg(i);
01545               defKeys.insert(shadeName, QKeySequence());
01546        }
01547 
01548        defKeys.insert("shadeOther", QKeySequence());
01549        defKeys.insert("typeEffectNormal", QKeySequence());
01550        defKeys.insert("typeEffectUnderline", QKeySequence());
01551        defKeys.insert("typeEffectUnderlineWords", QKeySequence());
01552        defKeys.insert("typeEffectStrikeThrough", QKeySequence());
01553        defKeys.insert("typeEffectAllCaps", QKeySequence());
01554        defKeys.insert("typeEffectSmallCaps", QKeySequence());
01555        defKeys.insert("typeEffectSuperscript", QKeySequence());
01556        defKeys.insert("typeEffectSubscript", QKeySequence());
01557        defKeys.insert("typeEffectOutline", QKeySequence());
01558        defKeys.insert("typeEffectShadow", QKeySequence());
01559 
01560        defKeys.insert("styleImageEffects", Qt::CTRL+Qt::Key_E);
01561        defKeys.insert("styleTabulators", QKeySequence());
01562 
01563        //Item Menu
01564        defKeys.insert("itemDuplicate", Qt::CTRL+Qt::ALT+Qt::SHIFT+Qt::Key_D);
01565        defKeys.insert("itemMulDuplicate", QKeySequence());
01566        defKeys.insert("itemDelete", Qt::CTRL+Qt::Key_K);
01567        defKeys.insert("itemGroup", Qt::CTRL+Qt::Key_G);
01568        defKeys.insert("itemUngroup", Qt::CTRL+Qt::SHIFT+Qt::Key_G);
01569        defKeys.insert("itemLock", Qt::CTRL+Qt::Key_L);
01570        defKeys.insert("itemLockSize", Qt::CTRL+Qt::SHIFT+Qt::Key_L);
01571        defKeys.insert("itemPrintingEnabled", QKeySequence());
01572        defKeys.insert("itemFlipH", QKeySequence());
01573        defKeys.insert("itemFlipV", QKeySequence());
01574        defKeys.insert("itemLowerToBottom", Qt::Key_End);
01575        defKeys.insert("itemRaiseToTop", Qt::Key_Home);
01576        defKeys.insert("itemLower", Qt::CTRL+Qt::Key_End);
01577        defKeys.insert("itemRaise", Qt::CTRL+Qt::Key_Home);
01578        defKeys.insert("itemSendToScrapbook", QKeySequence());
01579        defKeys.insert("itemSendToPattern", QKeySequence());
01580        defKeys.insert("itemAttributes", QKeySequence());
01581        defKeys.insert("itemImageInfo", QKeySequence());
01582        defKeys.insert("itemImageIsVisible", QKeySequence());
01583        defKeys.insert("itemUpdateImage", QKeySequence());
01584        defKeys.insert("itemAdjustFrameToImage", QKeySequence());
01585        defKeys.insert("itemExtendedImageProperties", QKeySequence());
01586        defKeys.insert("itemPreviewLow", QKeySequence());
01587        defKeys.insert("itemPreviewNormal", QKeySequence());
01588        defKeys.insert("itemPreviewFull", QKeySequence());
01589        defKeys.insert("itemPDFIsBookmark", QKeySequence());
01590        defKeys.insert("itemPDFIsAnnotation", QKeySequence());
01591        defKeys.insert("itemPDFAnnotationProps", QKeySequence());
01592        defKeys.insert("itemPDFFieldProps", QKeySequence());
01593        defKeys.insert("itemShapeEdit", QKeySequence());
01594        defKeys.insert("itemAttachTextToPath", QKeySequence());
01595        defKeys.insert("itemDetachTextFromPath", QKeySequence());
01596        defKeys.insert("itemCombinePolygons", QKeySequence());
01597        defKeys.insert("itemSplitPolygons", QKeySequence());
01598        defKeys.insert("itemConvertToBezierCurve", QKeySequence());
01599        defKeys.insert("itemConvertToImageFrame", QKeySequence());
01600        defKeys.insert("itemConvertToOutlines", QKeySequence());
01601        defKeys.insert("itemConvertToPolygon", QKeySequence());
01602        defKeys.insert("itemConvertToTextFrame", QKeySequence());
01603 
01604        //Insert Menu
01605        defKeys.insert("insertFrame", QKeySequence());
01606        defKeys.insert("insertGlyph", QKeySequence());
01607        defKeys.insert("insertSampleText", QKeySequence());
01608        defKeys.insert("stickyTools", QKeySequence());
01609 
01610        //Page menu
01611        defKeys.insert("pageInsert", QKeySequence());
01612        defKeys.insert("pageImport", QKeySequence());
01613        defKeys.insert("pageDelete", QKeySequence());
01614        defKeys.insert("pageCopy", QKeySequence());
01615        defKeys.insert("pageMove", QKeySequence());
01616        defKeys.insert("pageApplyMasterPage", QKeySequence());
01617        defKeys.insert("pageCopyToMasterPage", QKeySequence());
01618        defKeys.insert("pageManageGuides", QKeySequence());
01619        defKeys.insert("pageManageMargins", QKeySequence());
01620 
01621        //View Menu
01622        defKeys.insert("viewFitInWindow", Qt::CTRL+Qt::Key_0);
01623        defKeys.insert("viewFitWidth", QKeySequence());
01624        defKeys.insert("viewFit50", QKeySequence());
01625        defKeys.insert("viewFit75", QKeySequence());
01626        defKeys.insert("viewFit100", Qt::CTRL+Qt::Key_1);
01627        defKeys.insert("viewFit200", QKeySequence());
01628        defKeys.insert("viewFitPreview", QKeySequence());
01629        defKeys.insert("viewShowMargins", QKeySequence());
01630        defKeys.insert("viewShowBleeds", QKeySequence());
01631        defKeys.insert("viewShowFrames", QKeySequence());
01632        defKeys.insert("viewShowLayerMarkers", QKeySequence());
01633        defKeys.insert("viewShowImages", QKeySequence());
01634        defKeys.insert("viewShowGrid", QKeySequence());
01635        defKeys.insert("viewShowGuides", QKeySequence());
01636        defKeys.insert("viewShowColumnBorders", QKeySequence());
01637        defKeys.insert("viewShowBaseline", QKeySequence());
01638        defKeys.insert("viewShowTextChain", QKeySequence());
01639        defKeys.insert("viewShowTextControls", QKeySequence());
01640        defKeys.insert("viewShowRulers", Qt::CTRL+Qt::SHIFT+Qt::Key_R);
01641        defKeys.insert("viewRulerMode", QKeySequence());
01642        defKeys.insert("viewSnapToGrid", QKeySequence());
01643        defKeys.insert("viewSnapToGuides", QKeySequence());
01644 //     defKeys.insert("viewNewView", QKeySequence());
01645 
01646        //Tool menu
01647        defKeys.insert("toolsProperties", Qt::Key_F2);
01648        defKeys.insert("toolsOutline", QKeySequence());
01649        defKeys.insert("toolsScrapbook", QKeySequence());
01650        defKeys.insert("toolsLayers", Qt::Key_F6);
01651        defKeys.insert("toolsPages", QKeySequence());
01652        defKeys.insert("toolsBookmarks", QKeySequence());
01653        defKeys.insert("toolsMeasurements", QKeySequence());
01654        defKeys.insert("toolsActionHistory", QKeySequence());
01655        defKeys.insert("toolsPreflightVerifier", QKeySequence());
01656        defKeys.insert("toolsAlignDistribute", QKeySequence());
01657        defKeys.insert("toolsToolbarTools", QKeySequence());
01658        defKeys.insert("toolsToolbarPDF", QKeySequence());
01659 
01660        //toolbar only items
01661        defKeys.insert("toolsSelect", Qt::Key_C);
01662        defKeys.insert("toolsInsertTextFrame", QKeySequence(Qt::Key_T));
01663        defKeys.insert("toolsInsertImageFrame", Qt::Key_I);
01664        defKeys.insert("toolsInsertTableFrame", Qt::Key_A);
01665        defKeys.insert("toolsInsertShape", Qt::Key_S);
01666        defKeys.insert("toolsInsertPolygon", Qt::Key_P);
01667        defKeys.insert("toolsInsertLine", Qt::Key_L);
01668        defKeys.insert("toolsInsertBezier", Qt::Key_B);
01669        defKeys.insert("toolsInsertFreehandLine", Qt::Key_F);
01670        defKeys.insert("toolsRotate", Qt::Key_R);
01671        defKeys.insert("toolsZoom", Qt::Key_Z);
01672        defKeys.insert("toolsZoomIn", Qt::CTRL+Qt::Key_Plus);
01673        defKeys.insert("toolsZoomOut", Qt::CTRL+Qt::Key_Minus);
01674        defKeys.insert("toolsEditContents", Qt::Key_E);
01675        defKeys.insert("toolsEditWithStoryEditor", Qt::CTRL+Qt::Key_Y);
01676        defKeys.insert("toolsLinkTextFrame", Qt::Key_N);
01677        defKeys.insert("toolsUnlinkTextFrame", Qt::Key_U);
01678        defKeys.insert("toolsEyeDropper", Qt::Key_Y);
01679        defKeys.insert("toolsCopyProperties", QKeySequence());
01680 
01681        //PDF items
01682        defKeys.insert("toolsPDFPushButton", QKeySequence());
01683        defKeys.insert("toolsPDFTextField", QKeySequence());
01684        defKeys.insert("toolsPDFCheckBox", QKeySequence());
01685        defKeys.insert("toolsPDFComboBox", QKeySequence());
01686        defKeys.insert("toolsPDFListBox", QKeySequence());
01687        defKeys.insert("toolsPDFAnnotText", QKeySequence());
01688        defKeys.insert("toolsPDFAnnotLink", QKeySequence());
01689 
01690        //Extras Menu
01691        defKeys.insert("extrasManagePictures", QKeySequence());
01692        defKeys.insert("extrasHyphenateText", QKeySequence());
01693        defKeys.insert("extrasDeHyphenateText", QKeySequence());
01694        defKeys.insert("extrasGenerateTableOfContents", QKeySequence());
01695 
01696        //Windows Menu
01697        defKeys.insert("windowsCascade", QKeySequence());
01698        defKeys.insert("windowsTile", QKeySequence());
01699 
01700        //Help Menu
01701        defKeys.insert("helpAboutScribus", QKeySequence());
01702        defKeys.insert("helpAboutPlugins", QKeySequence());
01703        defKeys.insert("helpAboutQt", QKeySequence());
01704        defKeys.insert("helpTooltips", QKeySequence());
01705        defKeys.insert("helpManual", Qt::Key_F1);
01706 
01707        //GUI
01708        defKeys.insert("specialToggleAllPalettes", Qt::Key_F10);
01709        defKeys.insert("specialToggleAllGuides", Qt::Key_F11);
01710 
01711        //typography
01712        defKeys.insert("unicodeSmartHyphen", QKeySequence());
01713        defKeys.insert("unicodeNonBreakingHyphen", QKeySequence());
01714        defKeys.insert("unicodeNonBreakingSpace", QKeySequence());
01715        defKeys.insert("unicodePageNumber", QKeySequence());
01716        defKeys.insert("unicodeNewLine", QKeySequence());
01717        defKeys.insert("unicodeFrameBreak", Qt::CTRL+Qt::Key_Return);
01718        defKeys.insert("unicodeColumnBreak", Qt::CTRL+Qt::SHIFT+Qt::Key_Return);
01719        defKeys.insert("unicodeZerowidthSpace", QKeySequence());
01720        defKeys.insert("unicodeZerowidthNonBreakingSpace", QKeySequence());
01721        defKeys.insert("unicodeCopyRight", QKeySequence());
01722        defKeys.insert("unicodeRegdTM", QKeySequence());
01723        defKeys.insert("unicodeTM", QKeySequence());
01724        defKeys.insert("unicodeSolidus", QKeySequence());
01725        defKeys.insert("unicodeBullet", QKeySequence());
01726        defKeys.insert("unicodeMidpoint", QKeySequence());
01727        defKeys.insert("unicodeDashEm", QKeySequence());
01728        defKeys.insert("unicodeDashEn", QKeySequence());
01729        defKeys.insert("unicodeDashFigure", QKeySequence());
01730        defKeys.insert("unicodeDashQuotation", QKeySequence());
01731 
01732        defKeys.insert("unicodeQuoteApostrophe", QKeySequence());
01733        defKeys.insert("unicodeQuoteStraight", QKeySequence());
01734        defKeys.insert("unicodeQuoteSingleLeft", QKeySequence());
01735        defKeys.insert("unicodeQuoteSingleRight", QKeySequence());
01736        defKeys.insert("unicodeQuoteDoubleLeft", QKeySequence());
01737        defKeys.insert("unicodeQuoteDoubleRight", QKeySequence());
01738        defKeys.insert("unicodeQuoteSingleReversed", QKeySequence());
01739        defKeys.insert("unicodeQuoteDoubleReversed", QKeySequence());
01740        defKeys.insert("unicodeQuoteSingleLeftGuillemet", QKeySequence());
01741        defKeys.insert("unicodeQuoteSingleRightGuillemet", QKeySequence());
01742        defKeys.insert("unicodeQuoteDoubleLeftGuillemet", QKeySequence());
01743        defKeys.insert("unicodeQuoteDoubleRightGuillemet", QKeySequence());
01744        defKeys.insert("unicodeQuoteLowSingleComma", QKeySequence());
01745        defKeys.insert("unicodeQuoteLowDoubleComma", QKeySequence());
01746        defKeys.insert("unicodeQuoteCJKSingleLeft", QKeySequence());
01747        defKeys.insert("unicodeQuoteCJKSingleRight", QKeySequence());
01748        defKeys.insert("unicodeQuoteCJKDoubleLeft", QKeySequence());
01749        defKeys.insert("unicodeQuoteCJKDoubleRight", QKeySequence());
01750 
01751        defKeys.insert("unicodeSpaceEN", QKeySequence());
01752        defKeys.insert("unicodeSpaceEM", QKeySequence());
01753        defKeys.insert("unicodeSpaceThin", QKeySequence());
01754        defKeys.insert("unicodeSpaceThick", QKeySequence());
01755        defKeys.insert("unicodeSpaceMid", QKeySequence());
01756        defKeys.insert("unicodeSpaceHair", QKeySequence());
01757 
01758        defKeys.insert("unicodeSmartHyphen", Qt::CTRL+Qt::SHIFT+Qt::Key_Minus);
01759        defKeys.insert("unicodeNonBreakingHyphen", Qt::CTRL+Qt::ALT+Qt::Key_Minus);
01760        defKeys.insert("unicodeNonBreakingSpace", Qt::CTRL+Qt::Key_Space);
01761        defKeys.insert("unicodePageNumber", Qt::CTRL+Qt::SHIFT+Qt::ALT+Qt::Key_P);
01762        defKeys.insert("unicodeNewLine", Qt::SHIFT+Qt::Key_Return);
01763 
01764        defKeys.insert("unicodeLigature_ff", QKeySequence());
01765        defKeys.insert("unicodeLigature_fi", QKeySequence());
01766        defKeys.insert("unicodeLigature_fl", QKeySequence());
01767        defKeys.insert("unicodeLigature_ffi", QKeySequence());
01768        defKeys.insert("unicodeLigature_ffl", QKeySequence());
01769        defKeys.insert("unicodeLigature_ft", QKeySequence());
01770        defKeys.insert("unicodeLigature_st", QKeySequence());
01771 
01772        //Plugins
01773        defKeys.insert("ExportAsImage", Qt::CTRL+Qt::SHIFT+Qt::Key_E);
01774        defKeys.insert("NewFromDocumentTemplate", Qt::CTRL+Qt::ALT+Qt::Key_N);
01775        defKeys.insert("SaveAsDocumentTemplate", Qt::CTRL+Qt::ALT+Qt::Key_S);
01776 }
01777 
01778 void ActionManager::createDefaultMenus()
01779 {   //CB TODO use this to also create the menus
01780        defMenus.clear();
01781        defMenus.append(QPair<QString, QStringList>("File", QStringList()));
01782        defMenus.append(QPair<QString, QStringList>("Edit", QStringList()));
01783        defMenus.append(QPair<QString, QStringList>("Style", QStringList()));
01784        defMenus.append(QPair<QString, QStringList>("Item", QStringList()));
01785        defMenus.append(QPair<QString, QStringList>("Insert", QStringList()));
01786        defMenus.append(QPair<QString, QStringList>("Page", QStringList()));
01787        defMenus.append(QPair<QString, QStringList>("View", QStringList()));
01788        defMenus.append(QPair<QString, QStringList>("Extras", QStringList()));
01789        defMenus.append(QPair<QString, QStringList>("Window", QStringList()));
01790        defMenus.append(QPair<QString, QStringList>("Help", QStringList()));
01791 //     defMenus.append(QPair<QString, QStringList>("Other", QStringList()));
01792 
01793        QValueVector< QPair<QString, QStringList> >::Iterator itmenu = defMenus.begin();
01794        //File
01795        itmenu->second << "fileNew" << "fileOpen" << "fileClose" << "fileSave" << "fileSaveAs" << "fileRevert" << "fileCollect";
01796        itmenu->second << "fileImportText" << "fileImportText2" << "fileImportAppendText" << "fileImportImage" << "fileExportText" << "fileExportAsEPS" << "fileExportAsPDF";
01797        itmenu->second << "fileDocSetup" << "filePreferences" << "filePrint" << "PrintPreview" << "fileQuit";
01798        ++itmenu;
01799        //Edit
01800        itmenu->second << "editUndoAction" << "editRedoAction" << "editActionMode" << "editCut" << "editCopy" << "editPaste" << "editCopyContents" << "editPasteContents" << "editPasteContentsAbs" << "editClearContents" << "editSelectAll" << "editDeselectAll" << "editSearchReplace" << "toolsEditWithStoryEditor" << "editEditWithImageEditor" << "editExtendedImageProperties" << "editColors" << "editPatterns" << "editStyles" << "editMasterPages" << "editJavascripts";
01801        //Style
01802        ++itmenu;
01803        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
01804        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
01805        for (uint s = 0; s < f_size; ++s)
01806               itmenu->second << QString("fontSize%1").arg(font_sizes[s]);
01807        itmenu->second << "fontSizeOther";
01808        itmenu->second << "alignLeft" << "alignCenter" << "alignRight" << "alignBlock" << "alignForced";
01809        for (uint i=0; i<=100 ; i+=10)
01810               itmenu->second << QString("shade%1").arg(i);
01811        itmenu->second << "shadeOther";
01812        itmenu->second << "typeEffectNormal" << "typeEffectUnderline" << "typeEffectUnderlineWords" << "typeEffectStrikeThrough" << "typeEffectAllCaps" << "typeEffectSmallCaps" << "typeEffectSuperscript" << "typeEffectSubscript" << "typeEffectOutline" << "typeEffectShadow" << "styleImageEffects" << "styleTabulators";
01813        //Item
01814        ++itmenu;
01815        itmenu->second << "itemDuplicate" << "itemMulDuplicate" << "itemDelete" << "itemGroup" << "itemUngroup" << "itemLock" << "itemLockSize" << "itemImageIsVisible" << "itemUpdateImage" << "itemAdjustFrameToImage" << "itemExtendedImageProperties" << "itemPreviewLow" << "itemPreviewNormal" << "itemPreviewFull" << "itemRaise" << "itemLower" << "itemRaiseToTop" << "itemLowerToBottom" << "itemSendToScrapbook" << "itemSendToPattern" << "itemAttributes" << "itemPDFIsAnnotation" << "itemPDFIsBookmark" << "itemPDFAnnotationProps" << "itemPDFFieldProps" << "itemShapeEdit" << "itemConvertToBezierCurve" << "itemConvertToImageFrame" << "itemConvertToOutlines" << "itemConvertToPolygon" << "itemConvertToTextFrame" << "itemAttachTextToPath" << "itemDetachTextFromPath" << "itemCombinePolygons" << "itemSplitPolygons";
01816        //Insert
01817        ++itmenu;
01818        itmenu->second
01819               << "insertFrame"
01820               << "toolsInsertTextFrame"
01821               << "toolsInsertImageFrame"
01822               << "toolsInsertTableFrame"
01823               << "toolsInsertShape"
01824               << "toolsInsertPolygon"
01825               << "toolsInsertLine"
01826               << "toolsInsertBezier"
01827               << "toolsInsertFreehandLine"
01828               << "stickyTools"
01829               << "insertGlyph"
01830               << "insertSampleText";
01831 
01832        itmenu->second
01833               << "unicodeSmartHyphen"
01834               << "unicodeNonBreakingHyphen"
01835               << "unicodeNonBreakingSpace"
01836               << "unicodePageNumber"
01837               << "unicodeNewLine"
01838               << "unicodeFrameBreak"
01839               << "unicodeColumnBreak"
01840               << "unicodeZerowidthSpace"
01841               << "unicodeCopyRight"
01842               << "unicodeRegdTM"
01843               << "unicodeTM"
01844               << "unicodeSolidus"
01845               << "unicodeBullet"
01846               << "unicodeMidpoint"
01847               << "unicodeDashEm"
01848               << "unicodeDashEn"
01849               << "unicodeDashFigure"
01850               << "unicodeDashQuotation";
01851 
01852         itmenu->second
01853                << "unicodeQuoteApostrophe"
01854                << "unicodeQuoteStraight"
01855                << "unicodeQuoteSingleLeft"
01856                << "unicodeQuoteSingleRight"
01857                << "unicodeQuoteDoubleLeft"
01858                << "unicodeQuoteDoubleRight"
01859                << "unicodeQuoteSingleReversed"
01860                << "unicodeQuoteDoubleReversed"
01861                << "unicodeQuoteSingleLeftGuillemet"
01862                << "unicodeQuoteSingleRightGuillemet"
01863                << "unicodeQuoteDoubleLeftGuillemet"
01864                << "unicodeQuoteDoubleRightGuillemet"
01865                << "unicodeQuoteLowSingleComma"
01866                << "unicodeQuoteLowDoubleComma"
01867                << "unicodeQuoteCJKSingleLeft"
01868                << "unicodeQuoteCJKSingleRight"
01869                << "unicodeQuoteCJKDoubleLeft"
01870                << "unicodeQuoteCJKDoubleRight";
01871 
01872         itmenu->second
01873                << "unicodeSpaceEN"
01874                << "unicodeSpaceEM"
01875                << "unicodeSpaceThin"
01876                << "unicodeSpaceThick"
01877                << "unicodeSpaceMid"
01878                << "unicodeSpaceHair";
01879 
01880         itmenu->second
01881                << "unicodeSmartHyphen"
01882                << "unicodeNonBreakingHyphen"
01883                << "unicodeNonBreakingSpace"
01884                << "unicodePageNumber"
01885                << "unicodeNewLine"
01886                << "unicodeFrameBreak"
01887                << "unicodeColumnBreak";
01888 
01889         itmenu->second
01890                << "unicodeLigature_ff"
01891                << "unicodeLigature_fi"
01892                << "unicodeLigature_fl"
01893                << "unicodeLigature_ffi"
01894                << "unicodeLigature_ffl"
01895                << "unicodeLigature_ft"
01896                << "unicodeLigature_st";
01897 
01898 
01899        //Page
01900        ++itmenu;
01901        itmenu->second << "pageInsert" << "pageImport" << "pageDelete" << "pageCopy" << "pageMove" << "pageApplyMasterPage" << "pageCopyToMasterPage" << "pageManageGuides" << "pageManageMargins" << "viewSnapToGrid" << "viewSnapToGuides";
01902        //View
01903        ++itmenu;
01904        itmenu->second << "viewFitWidth" << "viewFitInWindow" << "viewFit50" << "viewFit75" << "viewFit100" << "viewFit200" << "viewFitPreview" << "viewShowMargins" << "viewShowBleeds" << "viewShowFrames" << "viewShowLayerMarkers" << "viewShowImages" << "viewShowGrid" << "viewShowGuides" << "viewShowColumnBorders" << "viewShowBaseline" << "viewShowTextChain" << "viewShowTextControls" << "viewShowRulers" << "viewRulerMode";
01905        //Extras
01906        ++itmenu;
01907        itmenu->second << "extrasManagePictures" << "extrasHyphenateText" << "extrasDeHyphenateText" << "extrasGenerateTableOfContents";
01908        //Windows
01909        ++itmenu;
01910        itmenu->second  << "windowsCascade" << "windowsTile" << "toolsProperties" << "toolsOutline" << "toolsScrapbook" << "toolsLayers" << "toolsPages" << "toolsBookmarks" << "toolsMeasurements" << "toolsActionHistory" << "toolsPreflightVerifier" << "toolsAlignDistribute" << "toolsToolbarTools" << "toolsToolbarPDF";
01911        //Help
01912        ++itmenu;
01913        itmenu->second << "helpAboutScribus" << "helpAboutPlugins" << "helpAboutQt" << "helpTooltips" << "helpManual";
01914        //Other
01915 //     ++itmenu;
01916 //     itmenu->second << "";
01917 }
01918 
01919 void ActionManager::createDefaultNonMenuActions()
01920 {   //CB TODO use this to also create the menus
01921        defNonMenuActions.clear();
01922        defNonMenuActions.append(QPair<QString, QStringList>("Plugin Menu Items", QStringList()));
01923        defNonMenuActions.append(QPair<QString, QStringList>("Others", QStringList()));
01924        defNonMenuActions.append(QPair<QString, QStringList>("Unicode Characters", QStringList()));
01925 
01926 
01927        QValueVector< QPair<QString, QStringList> >::Iterator itnmenua = defNonMenuActions.begin();
01928        //Plugins
01929        itnmenua->second << "ExportAsImage";
01930        itnmenua->second << "NewFromDocumentTemplate";
01931        itnmenua->second << "SaveAsDocumentTemplate";
01932 
01933        //Toolbars etc
01934        ++itnmenua;
01935        itnmenua->second << "toolsSelect";
01936        itnmenua->second << "toolsRotate";
01937        itnmenua->second << "toolsZoom";
01938        itnmenua->second << "toolsZoomIn";
01939        itnmenua->second << "toolsZoomOut";
01940        itnmenua->second << "toolsEditContents";
01941        itnmenua->second << "toolsLinkTextFrame";
01942        itnmenua->second << "toolsUnlinkTextFrame";
01943        itnmenua->second << "toolsEyeDropper";
01944        itnmenua->second << "toolsCopyProperties";
01945        itnmenua->second << "toolsPDFPushButton";
01946        itnmenua->second << "toolsPDFTextField";
01947        itnmenua->second << "toolsPDFCheckBox";
01948        itnmenua->second << "toolsPDFListBox";
01949        itnmenua->second << "toolsPDFAnnotText";
01950        itnmenua->second << "toolsPDFAnnotLink";
01951        itnmenua->second << "specialToggleAllPalettes";
01952        itnmenua->second << "specialToggleAllGuides";
01953 
01954        //Unicode
01955        ++itnmenua;
01956        itnmenua->second << "unicodeSmartHyphen";
01957        itnmenua->second << "unicodeNonBreakingHyphen";
01958        itnmenua->second << "unicodeNonBreakingSpace";
01959        itnmenua->second << "unicodePageNumber";
01960        itnmenua->second << "unicodeNewLine";
01961        itnmenua->second << "unicodeFrameBreak";
01962        itnmenua->second << "unicodeColumnBreak";
01963        itnmenua->second << "unicodeZerowidthSpace";
01964        itnmenua->second << "unicodeCopyRight";
01965        itnmenua->second << "unicodeRegdTM";
01966        itnmenua->second << "unicodeTM";
01967        itnmenua->second << "unicodeSolidus";
01968        itnmenua->second << "unicodeBullet";
01969        itnmenua->second << "unicodeMidpoint";
01970        itnmenua->second << "unicodeDashEm";
01971        itnmenua->second << "unicodeDashEn";
01972        itnmenua->second << "unicodeDashFigure";
01973        itnmenua->second << "unicodeDashQuotation";
01974 
01975        itnmenua->second << "unicodeQuoteApostrophe";
01976        itnmenua->second << "unicodeQuoteStraight";
01977        itnmenua->second << "unicodeQuoteSingleLeft";
01978        itnmenua->second << "unicodeQuoteSingleRight";
01979        itnmenua->second << "unicodeQuoteDoubleLeft";
01980        itnmenua->second << "unicodeQuoteDoubleRight";
01981        itnmenua->second << "unicodeQuoteSingleReversed";
01982        itnmenua->second << "unicodeQuoteDoubleReversed";
01983        itnmenua->second << "unicodeQuoteSingleLeftGuillemet";
01984        itnmenua->second << "unicodeQuoteSingleRightGuillemet";
01985        itnmenua->second << "unicodeQuoteDoubleLeftGuillemet";
01986        itnmenua->second << "unicodeQuoteDoubleRightGuillemet";
01987        itnmenua->second << "unicodeQuoteLowSingleComma";
01988        itnmenua->second << "unicodeQuoteLowDoubleComma";
01989        itnmenua->second << "unicodeQuoteCJKSingleLeft";
01990        itnmenua->second << "unicodeQuoteCJKSingleRight";
01991        itnmenua->second << "unicodeQuoteCJKDoubleLeft";
01992        itnmenua->second << "unicodeQuoteCJKDoubleRight";
01993 
01994        itnmenua->second << "unicodeSpaceEN";
01995        itnmenua->second << "unicodeSpaceEM";
01996        itnmenua->second << "unicodeSpaceThin";
01997        itnmenua->second << "unicodeSpaceThick";
01998        itnmenua->second << "unicodeSpaceMid";
01999        itnmenua->second << "unicodeSpaceHair";
02000 
02001        itnmenua->second << "unicodeSmartHyphen";
02002        itnmenua->second << "unicodeNonBreakingHyphen";
02003        itnmenua->second << "unicodeNonBreakingSpace";
02004        itnmenua->second << "unicodePageNumber";
02005        itnmenua->second << "unicodeNewLine";
02006 
02007        itnmenua->second << "unicodeLigature_ff";
02008        itnmenua->second << "unicodeLigature_fi";
02009        itnmenua->second << "unicodeLigature_fl";
02010        itnmenua->second << "unicodeLigature_ffi";
02011        itnmenua->second << "unicodeLigature_ffl";
02012        itnmenua->second << "unicodeLigature_ft";
02013        itnmenua->second << "unicodeLigature_st";
02014 }
02015 
02016 void ActionManager::handleMultipleSelections(bool isMultiple)
02017 {
02018        (*scrActions)["itemAttributes"]->setEnabled(!isMultiple);
02019 }