Subversion Repositories Scribus

Rev

Rev 3716 | Rev 3786 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1993 cbradney 1
/***************************************************************************
2
        begin                : Apr 2005
3
        copyright            : (C) 2005 by Craig Bradney
4
        email                : cbradney@zip.com.au
5
***************************************************************************/
6
 
7
/***************************************************************************
8
*                                                                         *
9
*   ScApp program is free software; you can redistribute it and/or modify  *
10
*   it under the terms of the GNU General Public License as published by  *
11
*   the Free Software Foundation; either version 2 of the License, or     *
12
*   (at your option) any later version.                                   *
13
*                                                                         *
14
***************************************************************************/
15
 
16
#include "actionmanager.h"
17
#include "actionmanager.moc"
18
 
19
#include "scribus.h"
2026 cbradney 20
#include "scribusview.h"
1993 cbradney 21
#include "undomanager.h"
22
 
2246 subik 23
ActionManager::ActionManager ( QObject * parent, const char * name ) : QObject ( parent, name )
1993 cbradney 24
{
25
        ScApp=(ScribusApp *)parent;
26
        scrActions=&(ScApp->scrActions);
27
        scrActionGroups=&(ScApp->scrActionGroups);
1995 cbradney 28
        modeActionNames=new QStringList();
29
        nonEditActionNames=new QStringList();
30
        unicodeCharActionNames=new QStringList();
1993 cbradney 31
        undoManager = UndoManager::instance();
2246 subik 32
 
3580 avox 33
#ifdef Q_WS_MAC
34
        noIcon = loadIcon("noicon.xpm");
35
#endif
36
 
1993 cbradney 37
        createActions();
2161 cbradney 38
        languageChange();
1993 cbradney 39
}
40
 
41
void ActionManager::createActions()
42
{
43
        initFileMenuActions();
44
        initEditMenuActions();
45
        initStyleMenuActions();
46
        initItemMenuActions();
47
        initInsertMenuActions();
48
        initPageMenuActions();
49
        initViewMenuActions();
50
        initToolsMenuActions();
51
        initExtrasMenuActions();
52
        initWindowsMenuActions();
53
        initScriptMenuActions();
54
        initHelpMenuActions();
55
        initSpecialActions();
56
}
57
 
58
void ActionManager::initFileMenuActions()
59
{
60
        //File Menu
2161 cbradney 61
        scrActions->insert("fileNew", new ScrAction(QIconSet(loadIcon("DateiNeu16.png"), loadIcon("DateiNeu.xpm")), "", CTRL+Key_N, ScApp, "fileNew"));
2170 cbradney 62
        scrActions->insert("fileOpen", new ScrAction(QIconSet(loadIcon("DateiOpen16.png"), loadIcon("DateiOpen.xpm")), "", CTRL+Key_O, ScApp, "fileOpen"));
63
        scrActions->insert("fileClose", new ScrAction(QIconSet(loadIcon("DateiClos16.png"), loadIcon("DateiClose.png")), "", CTRL+Key_W, ScApp, "fileClose"));
64
        scrActions->insert("fileSave", new ScrAction(QIconSet(loadIcon("DateiSave16.png"), loadIcon("DateiSave2.png")), "", CTRL+Key_S, ScApp, "fileSave"));
3552 avox 65
        scrActions->insert("fileSaveAs", new ScrAction(loadIcon("filesaveas.png"), "", CTRL+SHIFT+Key_S, ScApp, "fileSaveAs"));
66
        scrActions->insert("fileRevert", new ScrAction(loadIcon("revert.png"), "", QKeySequence(), ScApp, "fileRevert"));
3580 avox 67
        scrActions->insert("fileCollect", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileCollect"));
1993 cbradney 68
        //File Import Menu
3580 avox 69
        scrActions->insert("fileImportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileImportText"));
70
        scrActions->insert("fileImportAppendText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileImportAppendText"));
71
        scrActions->insert("fileImportImage", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileImportImage"));
1993 cbradney 72
 
73
        //File Export Menu
3580 avox 74
        scrActions->insert("fileExportText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileExportText"));
75
        scrActions->insert("fileExportAsEPS", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "fileExportAsEPS"));
2170 cbradney 76
        scrActions->insert("fileExportAsPDF", new ScrAction(loadIcon("acrobat.png"), "", QKeySequence(), ScApp, "fileExportAsPDF"));
1993 cbradney 77
        //Rest of File Menu
3541 avox 78
        scrActions->insert("fileDocSetup", new ScrAction(QPixmap(loadIcon("scribusdoc16.png")), "", 0, ScApp, "fileDocSetup"));
2170 cbradney 79
        scrActions->insert("filePrint", new ScrAction(QIconSet(loadIcon("DateiPrint16.png"), loadIcon("DateiPrint.xpm")), "", CTRL+Key_P, ScApp, "filePrint"));
3580 avox 80
        scrActions->insert("PrintPreview", new ScrAction(QIconSet(noIcon), "", CTRL+ALT+Key_P, ScApp, "PrintPreview"));
2170 cbradney 81
        scrActions->insert("fileQuit", new ScrAction(QPixmap(loadIcon("exit.png")), "", CTRL+Key_Q, ScApp, "fileQuit"));
1993 cbradney 82
 
83
        //Connect our signals and slots
84
        //File Menu
85
        connect( (*scrActions)["fileNew"], SIGNAL(activated()), ScApp, SLOT(slotFileNew()) );
86
        connect( (*scrActions)["fileOpen"], SIGNAL(activated()), ScApp, SLOT(slotDocOpen()) );
87
        connect( (*scrActions)["fileClose"], SIGNAL(activated()), ScApp, SLOT(slotFileClose()) );
88
        connect( (*scrActions)["filePrint"], SIGNAL(activated()), ScApp, SLOT(slotFilePrint()) );
3165 fschmid 89
        connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), ScApp, SLOT(printPreview()) );
1993 cbradney 90
        connect( (*scrActions)["fileSave"], SIGNAL(activated()), ScApp, SLOT(slotFileSave()) );
91
        connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), ScApp, SLOT(slotFileSaveAs()) );
92
        connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), ScApp, SLOT(SetupDoc()) );
93
        connect( (*scrActions)["fileRevert"], SIGNAL(activated()), ScApp, SLOT(slotFileRevert()) );
94
        connect( (*scrActions)["fileCollect"], SIGNAL(activated()), ScApp, SLOT(Collect()) );
95
        connect( (*scrActions)["fileQuit"], SIGNAL(activated()), ScApp, SLOT(slotFileQuit()) );
96
        //File Import Menu
97
        connect( (*scrActions)["fileImportText"], SIGNAL(activated()), ScApp, SLOT(slotFileOpen()) );
98
        connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), ScApp, SLOT(slotFileAppend()) );
99
        connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), ScApp, SLOT(slotFileOpen()) );
100
        //File Export Menu
101
        connect( (*scrActions)["fileExportText"], SIGNAL(activated()), ScApp, SLOT(SaveText()) );
102
        connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), ScApp, SLOT(SaveAsEps()) );
103
        connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), ScApp, SLOT(SaveAsPDF()) );
104
        //The rest are plugins
105
}
106
 
107
void ActionManager::initEditMenuActions()
108
{
109
        //Edit Menu
2170 cbradney 110
        scrActions->insert("editUndoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("u_undo16.png"), loadIcon("u_undo.png")), "", CTRL+Key_Z, ScApp, "editUndoAction",1));
111
        scrActions->insert("editRedoAction", new ScrAction(ScrAction::DataInt, QIconSet(loadIcon("u_redo16.png"), loadIcon("u_redo.png")), "", CTRL+SHIFT+Key_Z, ScApp, "editRedoAction", 1));
3580 avox 112
        scrActions->insert("editActionMode", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editActionMode"));
1993 cbradney 113
        (*scrActions)["editActionMode"]->setToggleAction(true);
3716 cbradney 114
        scrActions->insert("editCut", new ScrAction(QIconSet(loadIcon("editcut.png"), loadIcon("editcut22.png")), "", CTRL+Key_X, ScApp, "editCut"));
2170 cbradney 115
        scrActions->insert("editCopy", new ScrAction(QIconSet(loadIcon("editcopy.png"), loadIcon("editcopy.png")), "", CTRL+Key_C, ScApp, "editCopy"));
116
        scrActions->insert("editPaste", new ScrAction(QIconSet(loadIcon("editpaste.png"), loadIcon("editpaste.png")), "", CTRL+Key_V, ScApp, "editPaste"));
3716 cbradney 117
        scrActions->insert("editClearContents", new ScrAction(QIconSet(loadIcon("editdelete.png"), loadIcon("editdelete22.png")), "", QKeySequence(), ScApp, "editClearContents"));
3580 avox 118
        scrActions->insert("editSelectAll", new ScrAction(QIconSet(noIcon), "", CTRL+Key_A, ScApp, "editSelectAll"));
119
        scrActions->insert("editDeselectAll", new ScrAction(QIconSet(noIcon), "", CTRL+SHIFT+Key_A, ScApp, "editDeselectAll"));
2170 cbradney 120
        scrActions->insert("editSearchReplace", new ScrAction(QIconSet(loadIcon("find16.png"), loadIcon("find16.png")), "", QKeySequence(CTRL+Key_F), ScApp, "editSearchReplace"));
2264 subik 121
 
3580 avox 122
        scrActions->insert("editEditWithImageEditor", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editEditWithImageEditor"));
1993 cbradney 123
 
3580 avox 124
        scrActions->insert("editColors", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editColors"));
125
        scrActions->insert("editParaStyles", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editParaStyles"));
126
        scrActions->insert("editLineStyles", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editLineStyles"));
127
        scrActions->insert("editMasterPages", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editMasterPages"));
128
        scrActions->insert("editJavascripts", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editJavascripts"));
129
        scrActions->insert("editPreferences", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "editPreferences"));
1993 cbradney 130
 
131
        connect( (*scrActions)["editUndoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(undo(int)) );
132
        connect( (*scrActions)["editRedoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(redo(int)) );
133
        connect( (*scrActions)["editActionMode"], SIGNAL(toggled(bool)), ScApp, SLOT(setUndoMode(bool)) );
134
        connect( (*scrActions)["editCut"], SIGNAL(activated()), ScApp, SLOT(slotEditCut()) );
135
        connect( (*scrActions)["editCopy"], SIGNAL(activated()), ScApp, SLOT(slotEditCopy()) );
136
        connect( (*scrActions)["editPaste"], SIGNAL(activated()), ScApp, SLOT(slotEditPaste()) );
137
        connect( (*scrActions)["editClearContents"], SIGNAL(activated()), ScApp, SLOT(clearContents()) );
138
        connect( (*scrActions)["editSelectAll"], SIGNAL(activated()), ScApp, SLOT(SelectAll()) );
139
        connect( (*scrActions)["editDeselectAll"], SIGNAL(activated()), ScApp, SLOT(deselectAll()) );
140
        connect( (*scrActions)["editSearchReplace"], SIGNAL(activated()), ScApp, SLOT(SearchText()) );
2259 cbradney 141
        connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(activated()), ScApp, SLOT(callImageEditor()) );
1993 cbradney 142
        connect( (*scrActions)["editColors"], SIGNAL(activated()), ScApp, SLOT(slotEditColors()) );
143
        connect( (*scrActions)["editParaStyles"], SIGNAL(activated()), ScApp, SLOT(slotEditStyles()) );
144
        connect( (*scrActions)["editLineStyles"], SIGNAL(activated()), ScApp, SLOT(slotEditLineStyles()) );
2093 cbradney 145
        connect( (*scrActions)["editMasterPages"], SIGNAL(activated()), ScApp, SLOT(manageMasterPages()) );
1993 cbradney 146
        connect( (*scrActions)["editJavascripts"], SIGNAL(activated()), ScApp, SLOT(ManageJava()) );
147
        connect( (*scrActions)["editPreferences"], SIGNAL(activated()), ScApp, SLOT(slotPrefsOrg()) );
148
}
149
 
150
void ActionManager::initStyleMenuActions()
151
{
152
        //Text Size actions
153
        (*scrActionGroups).insert("fontSize", new QActionGroup(ScApp, "fontSize", true));
2170 cbradney 154
        scrActions->insert("fontSizeOther", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["fontSize"], "fontSizeOther", -1));
1993 cbradney 155
        connect( (*scrActions)["fontSizeOther"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemFSize(int)));
156
 
157
        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
158
        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
159
        for (uint s = 0; s < f_size; ++s)
160
        {
161
                QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
2170 cbradney 162
                scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["fontSize"], fontSizeName, font_sizes[s]));
1993 cbradney 163
                (*scrActions)[fontSizeName]->setToggleAction(true);
164
                connect( (*scrActions)[fontSizeName], SIGNAL(activatedData(int)), ScApp, SLOT(setItemFSize(int)));
165
        }
166
 
167
        //Alignment actions
2170 cbradney 168
        scrActions->insert("alignLeft", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "alignLeft", 0));
169
        scrActions->insert("alignCenter", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "alignCenter", 1));
170
        scrActions->insert("alignRight", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "alignRight", 2));
171
        scrActions->insert("alignBlock", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "alignBlock", 3));
172
        scrActions->insert("alignForced", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "alignForced", 4));
1993 cbradney 173
 
174
        (*scrActions)["alignLeft"]->setToggleAction(true);
175
        (*scrActions)["alignCenter"]->setToggleAction(true);
176
        (*scrActions)["alignRight"]->setToggleAction(true);
177
        (*scrActions)["alignBlock"]->setToggleAction(true);
178
        (*scrActions)["alignForced"]->setToggleAction(true);
179
 
180
        connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), ScApp, SLOT(setNewAbStyle(int)));
181
        connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), ScApp, SLOT(setNewAbStyle(int)));
182
        connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), ScApp, SLOT(setNewAbStyle(int)));
183
        connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), ScApp, SLOT(setNewAbStyle(int)));
184
        connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), ScApp, SLOT(setNewAbStyle(int)));
185
 
186
        //Shade actions
187
        scrActionGroups->insert("shade", new QActionGroup(ScApp, "shade", true));
2170 cbradney 188
        scrActions->insert("shadeOther", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["shade"], "shadeOther", -1));
1993 cbradney 189
        connect( (*scrActions)["shadeOther"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemShade(int)));
190
        for (uint i=0; i<=100 ; i+=10)
191
        {
192
                QString shadeName=QString("shade%1").arg(i);
2170 cbradney 193
                scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["shade"], shadeName, i));
1993 cbradney 194
                (*scrActions)[shadeName]->setToggleAction(true);
195
                connect( (*scrActions)[shadeName], SIGNAL(activatedData(int)), ScApp, SLOT(setItemShade(int)));
196
        }
197
 
198
        //Type Effects actions
199
        scrActionGroups->insert("typeEffects", new QActionGroup(ScApp, "typeEffects", false));
2186 cbradney 200
        scrActions->insert("typeEffectNormal", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectNormal", 0));
201
        scrActions->insert("typeEffectUnderline", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectUnderline", 1));
2188 fschmid 202
        scrActions->insert("typeEffectUnderlineWords", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectUnderlineWords", 8));
2186 cbradney 203
        scrActions->insert("typeEffectStrikeThrough", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectStrikeThrough", 2));
204
        scrActions->insert("typeEffectAllCaps", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectAllCaps", 7));
205
        scrActions->insert("typeEffectSmallCaps", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectSmallCaps", 3));
206
        scrActions->insert("typeEffectSuperscript", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectSuperscript", 4));
207
        scrActions->insert("typeEffectSubscript", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectSubscript", 5));
208
        scrActions->insert("typeEffectOutline", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectOutline", 6));
2229 fschmid 209
        scrActions->insert("typeEffectShadow", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), (*scrActionGroups)["typeEffects"], "typeEffectShadow", 9));
1993 cbradney 210
        (*scrActions)["typeEffectNormal"]->setToggleAction(true);
211
        (*scrActions)["typeEffectUnderline"]->setToggleAction(true);
2188 fschmid 212
        (*scrActions)["typeEffectUnderlineWords"]->setToggleAction(true);
1993 cbradney 213
        (*scrActions)["typeEffectStrikeThrough"]->setToggleAction(true);
2185 fschmid 214
        (*scrActions)["typeEffectAllCaps"]->setToggleAction(true);
1993 cbradney 215
        (*scrActions)["typeEffectSmallCaps"]->setToggleAction(true);
216
        (*scrActions)["typeEffectSuperscript"]->setToggleAction(true);
217
        (*scrActions)["typeEffectSubscript"]->setToggleAction(true);
218
        (*scrActions)["typeEffectOutline"]->setToggleAction(true);
2229 fschmid 219
        (*scrActions)["typeEffectShadow"]->setToggleAction(true);
1993 cbradney 220
        connect( (*scrActions)["typeEffectNormal"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
221
        connect( (*scrActions)["typeEffectUnderline"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
2188 fschmid 222
        connect( (*scrActions)["typeEffectUnderlineWords"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
1993 cbradney 223
        connect( (*scrActions)["typeEffectStrikeThrough"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
224
        connect( (*scrActions)["typeEffectSmallCaps"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
2185 fschmid 225
        connect( (*scrActions)["typeEffectAllCaps"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
1993 cbradney 226
        connect( (*scrActions)["typeEffectSuperscript"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
227
        connect( (*scrActions)["typeEffectSubscript"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
228
        connect( (*scrActions)["typeEffectOutline"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
2229 fschmid 229
        connect( (*scrActions)["typeEffectShadow"], SIGNAL(activatedData(int)), ScApp, SLOT(setItemTypeStyle(int)));
1993 cbradney 230
 
231
        //Other Style menu items that get added in various places
2256 cbradney 232
        scrActions->insert("styleInvertPict", new ScrAction(ScApp, "styleInvertPict"));
233
        scrActions->insert("styleTabulators", new ScrAction(ScApp, "styleTabulators"));
2056 fschmid 234
        connect( (*scrActions)["styleInvertPict"], SIGNAL(activated()), ScApp, SLOT(ImageEffects()));
1993 cbradney 235
        connect( (*scrActions)["styleTabulators"], SIGNAL(activated()), ScApp, SLOT(EditTabs()));
236
 
237
}
238
 
239
void ActionManager::initItemMenuActions()
240
{
241
        //Item Menu
2170 cbradney 242
        scrActions->insert("itemDuplicate", new ScrAction("", CTRL+Key_D, ScApp, "itemDuplicate"));
243
        scrActions->insert("itemMulDuplicate", new ScrAction(ScApp, "itemMulDuplicate"));
244
        scrActions->insert("itemDelete", new ScrAction("", CTRL+Key_K, ScApp, "itemDelete"));
245
        scrActions->insert("itemGroup", new ScrAction("", CTRL+Key_G, ScApp, "itemGroup"));
246
        scrActions->insert("itemUngroup", new ScrAction("", CTRL+Key_U, ScApp, "itemUngroup"));
247
        scrActions->insert("itemLock", new ScrAction("", CTRL+Key_L, ScApp, "itemLock"));
248
        scrActions->insert("itemLockSize", new ScrAction("", CTRL+SHIFT+Key_L, ScApp, "itemLockSize"));
1993 cbradney 249
        (*scrActions)["itemLock"]->setToggleAction(true);
250
        (*scrActions)["itemLockSize"]->setToggleAction(true);
2170 cbradney 251
        scrActions->insert("itemLowerToBottom", new ScrAction(QIconSet(loadIcon("lower-to-bottom.png"), loadIcon("lower-to-bottom.png")), "", QKeySequence(Key_End), ScApp, "itemLowerToBottom"));
252
        scrActions->insert("itemRaiseToTop", new ScrAction(QIconSet(loadIcon("raise-to-top.png"), loadIcon("raise-to-top.png")), "", QKeySequence(Key_Home), ScApp, "itemRaiseToTop"));
253
        scrActions->insert("itemLower", new ScrAction(QIconSet(loadIcon("lower.png"), loadIcon("lower.png")), "", QKeySequence(CTRL+Key_End), ScApp, "itemLower"));
254
        scrActions->insert("itemRaise", new ScrAction(QIconSet(loadIcon("raise.png"), loadIcon("raise.png")), "", QKeySequence(CTRL+Key_Home), ScApp, "itemRaise"));
2355 cbradney 255
 
2170 cbradney 256
        scrActions->insert("itemSendToScrapbook", new ScrAction(ScApp, "itemSendToScrapbook"));
2246 subik 257
 
3706 fschmid 258
        scrActions->insert("itemImageInfo", new ScrAction(ScApp, "itemImageInfo"));
2170 cbradney 259
        scrActions->insert("itemAttributes", new ScrAction(ScApp, "itemAttributes"));
260
        scrActions->insert("itemImageIsVisible", new ScrAction(ScApp, "itemImageIsVisible"));
2260 cbradney 261
        scrActions->insert("itemUpdateImage", new ScrAction(ScApp, "itemUpdateImage"));
2259 cbradney 262
        scrActions->insert("itemAdjustFrameToImage", new ScrAction(ScApp, "itemAdjustFrameToImage"));
2260 cbradney 263
        scrActions->insert("itemExtendedImageProperties", new ScrAction(ScApp, "itemExtendedImageProperties"));
2256 cbradney 264
        scrActions->insert("itemPreviewLow", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "itemPreviewLow", 2));
265
        scrActions->insert("itemPreviewNormal", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "itemPreviewNormal", 1));
266
        scrActions->insert("itemPreviewFull", new ScrAction(ScrAction::DataInt, QIconSet(), "", QKeySequence(), ScApp, "itemPreviewFull", 0));
2170 cbradney 267
        scrActions->insert("itemPDFIsBookmark", new ScrAction(ScApp, "itemPDFIsBookmark"));
1993 cbradney 268
        (*scrActions)["itemPDFIsBookmark"]->setToggleAction(true);
2170 cbradney 269
        scrActions->insert("itemPDFIsAnnotation", new ScrAction(ScApp, "itemPDFIsAnnotation"));
1993 cbradney 270
        (*scrActions)["itemPDFIsAnnotation"]->setToggleAction(true);
2170 cbradney 271
        scrActions->insert("itemPDFAnnotationProps", new ScrAction(ScApp, "itemPDFAnnotationProps"));
272
        scrActions->insert("itemPDFFieldProps", new ScrAction(ScApp, "itemPDFFieldProps"));
2246 subik 273
 
1993 cbradney 274
        (*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
275
        (*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
276
        (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
277
        (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
2246 subik 278
 
2026 cbradney 279
        (*scrActions)["itemImageIsVisible"]->setToggleAction(true);
2256 cbradney 280
        (*scrActions)["itemPreviewLow"]->setToggleAction(true);
281
        (*scrActions)["itemPreviewNormal"]->setToggleAction(true);
282
        (*scrActions)["itemPreviewFull"]->setToggleAction(true);
2246 subik 283
 
2170 cbradney 284
        scrActions->insert("itemShapeEdit", new ScrAction(ScApp, "itemShapeEdit"));
1993 cbradney 285
        (*scrActions)["itemShapeEdit"]->setToggleAction(true);
2170 cbradney 286
        scrActions->insert("itemAttachTextToPath", new ScrAction(ScApp, "itemAttachTextToPath"));
287
        scrActions->insert("itemDetachTextFromPath", new ScrAction(ScApp, "itemDetachTextFromPath"));
288
        scrActions->insert("itemCombinePolygons", new ScrAction(ScApp, "itemCombinePolygons"));
289
        scrActions->insert("itemSplitPolygons", new ScrAction(ScApp, "itemSplitPolygons"));
290
        scrActions->insert("itemConvertToBezierCurve", new ScrAction(ScApp, "itemConvertToBezierCurve"));
291
        scrActions->insert("itemConvertToImageFrame", new ScrAction(ScApp, "itemConvertToImageFrame"));
292
        scrActions->insert("itemConvertToOutlines", new ScrAction(ScApp, "itemConvertToOutlines"));
293
        scrActions->insert("itemConvertToPolygon", new ScrAction(ScApp, "itemConvertToPolygon"));
294
        scrActions->insert("itemConvertToTextFrame", new ScrAction(ScApp, "itemConvertToTextFrame"));
1993 cbradney 295
 
296
        connect( (*scrActions)["itemDuplicate"], SIGNAL(activated()), ScApp, SLOT(ObjektDup()) );
297
        connect( (*scrActions)["itemMulDuplicate"], SIGNAL(activated()), ScApp, SLOT(ObjektDupM()) );
298
        connect( (*scrActions)["itemDelete"], SIGNAL(activated()), ScApp, SLOT(DeleteObjekt()) );
299
        connect( (*scrActions)["itemGroup"], SIGNAL(activated()), ScApp, SLOT(GroupObj()) );
300
        connect( (*scrActions)["itemUngroup"], SIGNAL(activated()), ScApp, SLOT(UnGroupObj()) );
2108 cbradney 301
        //connect( (*scrActions)["itemLock"], SIGNAL(activated()), ScApp, SLOT(ToggleObjLock()) );
302
        //connect( (*scrActions)["itemLockSize"], SIGNAL(activated()), ScApp, SLOT(ToggleObjSizeLock()) );
2103 cbradney 303
        //connect( (*scrActions)["itemPDFIsAnnotation"], SIGNAL(activated()), ScApp, SLOT(ToggleObjPDFAnnotation()) );
304
        //connect( (*scrActions)["itemPDFIsBookmark"], SIGNAL(activated()), ScApp, SLOT(ToggleObjPDFBookmark()) );
1993 cbradney 305
        connect( (*scrActions)["itemPDFAnnotationProps"], SIGNAL(activated()), ScApp, SLOT(ModifyAnnot()) );
306
        connect( (*scrActions)["itemPDFFieldProps"], SIGNAL(activated()), ScApp, SLOT(ModifyAnnot()) );
2104 cbradney 307
        //connect( (*scrActions)["itemLowerToBottom"], SIGNAL(activated()), ScApp, SLOT(Objekt2Back()) );
308
        //connect( (*scrActions)["itemRaiseToTop"], SIGNAL(activated()), ScApp, SLOT(Objekt2Front()) );
2026 cbradney 309
        //connect( (*scrActions)["itemLower"], SIGNAL(activated()), ScApp, SLOT(ObjektLower()) );
310
        //connect( (*scrActions)["itemRaise"], SIGNAL(activated()), ScApp, SLOT(ObjektRaise()) );
1993 cbradney 311
        connect( (*scrActions)["itemSendToScrapbook"], SIGNAL(activated()), ScApp, SLOT(PutScrap()) );
312
        connect( (*scrActions)["itemAttributes"], SIGNAL(activated()), ScApp, SLOT(objectAttributes()) );
313
        connect( (*scrActions)["itemShapeEdit"], SIGNAL(activated()), ScApp, SLOT(ToggleFrameEdit()) );
3706 fschmid 314
        connect( (*scrActions)["itemImageInfo"], SIGNAL(activated()), ScApp, SLOT(getImageInfo()) );
2026 cbradney 315
        //connect( (*scrActions)["itemAttachTextToPath"], SIGNAL(activated()), ScApp, SLOT(Pfadtext()) );
316
        //connect( (*scrActions)["itemDetachTextFromPath"], SIGNAL(activated()), ScApp, SLOT(noPfadtext()) );
317
        //connect( (*scrActions)["itemCombinePolygons"], SIGNAL(activated()), ScApp, SLOT(UniteOb()) );
318
        //connect( (*scrActions)["itemSplitPolygons"], SIGNAL(activated()), ScApp, SLOT(SplitUniteOb()) );
319
        //connect( (*scrActions)["itemConvertToBezierCurve"], SIGNAL(activated()), ScApp, SLOT(convertToBezierCurve()) );
320
        //connect( (*scrActions)["itemConvertToImageFrame"], SIGNAL(activated()), ScApp, SLOT(convertToImageFrame()) );
321
        //connect( (*scrActions)["itemConvertToOutlines"], SIGNAL(activated()), ScApp, SLOT(convertToOutlines()) );
322
        //connect( (*scrActions)["itemConvertToPolygon"], SIGNAL(activated()), ScApp, SLOT(convertToPolygon()) );
323
        //connect( (*scrActions)["itemConvertToTextFrame"], SIGNAL(activated()), ScApp, SLOT(convertToTextFrame()) );
1993 cbradney 324
}
325
 
326
void ActionManager::initInsertMenuActions()
327
{
328
        //Insert Menu
3580 avox 329
        scrActions->insert("insertGlyph", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "insertGlyph"));
330
        scrActions->insert("insertSampleText", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "insertSampleText"));
2246 subik 331
 
1993 cbradney 332
        connect( (*scrActions)["insertGlyph"], SIGNAL(activated()), ScApp, SLOT(slotCharSelect()) );
333
        connect( (*scrActions)["insertSampleText"], SIGNAL(activated()), ScApp, SLOT(insertSampleText()) );
334
}
335
 
336
void ActionManager::initPageMenuActions()
337
{
338
        //Page menu
2170 cbradney 339
        scrActions->insert("pageInsert", new ScrAction(ScApp, "pageInsert"));
340
        scrActions->insert("pageImport", new ScrAction(ScApp, "pageImport"));
341
        scrActions->insert("pageDelete", new ScrAction(ScApp, "pageDelete"));
342
        scrActions->insert("pageCopy", new ScrAction(ScApp, "pageCopy"));
343
        scrActions->insert("pageMove", new ScrAction(ScApp, "pageMove"));
344
        scrActions->insert("pageApplyMasterPage", new ScrAction(ScApp, "pageApplyMasterPage"));
3187 fschmid 345
        scrActions->insert("pageCopyToMasterPage", new ScrAction(ScApp, "pageCopyToMasterPage"));
2170 cbradney 346
        scrActions->insert("pageManageGuides", new ScrAction(ScApp, "pageManageGuides"));
2777 fschmid 347
        scrActions->insert("pageManageMargins", new ScrAction(ScApp, "pageManageMargins"));
1993 cbradney 348
 
349
        connect( (*scrActions)["pageInsert"], SIGNAL(activated()), ScApp, SLOT(slotNewPageM()) );
2093 cbradney 350
        connect( (*scrActions)["pageImport"], SIGNAL(activated()), ScApp, SLOT(slotPageImport()) );
1993 cbradney 351
        connect( (*scrActions)["pageDelete"], SIGNAL(activated()), ScApp, SLOT(DeletePage()) );
352
        connect( (*scrActions)["pageCopy"], SIGNAL(activated()), ScApp, SLOT(CopyPage()) );
353
        connect( (*scrActions)["pageMove"], SIGNAL(activated()), ScApp, SLOT(MovePage()) );
2093 cbradney 354
        connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(activated()), ScApp, SLOT(ApplyMasterPage()) );
3187 fschmid 355
        connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(activated()), ScApp, SLOT(duplicateToMasterPage()) );
1993 cbradney 356
        connect( (*scrActions)["pageManageGuides"], SIGNAL(activated()), ScApp, SLOT(ManageGuides()) );
2777 fschmid 357
        connect( (*scrActions)["pageManageMargins"], SIGNAL(activated()), ScApp, SLOT(changePageMargins()) );
1993 cbradney 358
}
359
 
360
void ActionManager::initViewMenuActions()
361
{
2170 cbradney 362
        scrActions->insert("viewFitInWindow", new ScrAction(ScrAction::DataDouble, QIconSet(), "", CTRL+Key_0, ScApp, "viewFitInWindow", 0, -100.0));
363
        scrActions->insert("viewFit50", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScApp, "viewFit50", 0, 50.0));
364
        scrActions->insert("viewFit75", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScApp, "viewFit75", 0, 75.0));
365
        scrActions->insert("viewFit100", new ScrAction(ScrAction::DataDouble, QIconSet(), "", CTRL+Key_1, ScApp, "viewFit100", 0, 100.0));
366
        scrActions->insert("viewFit200", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScApp, "viewFit200", 0, 200.0));
367
        scrActions->insert("viewFit20", new ScrAction(ScrAction::DataDouble, QIconSet(), "", QKeySequence(), ScApp, "viewFit20", 0, 20.0));
368
        scrActions->insert("viewShowMargins", new ScrAction(ScApp, "viewShowMargins"));
369
        scrActions->insert("viewShowFrames", new ScrAction(ScApp, "viewShowFrames"));
370
        scrActions->insert("viewShowImages", new ScrAction(ScApp, "viewShowImages"));
371
        scrActions->insert("viewShowGrid", new ScrAction(ScApp, "viewShowGrid"));
372
        scrActions->insert("viewShowGuides", new ScrAction(ScApp, "viewShowGuides"));
373
        scrActions->insert("viewShowBaseline", new ScrAction(ScApp, "viewShowBaseline"));
374
        scrActions->insert("viewShowTextChain", new ScrAction(ScApp, "viewShowTextChain"));
2353 fschmid 375
        scrActions->insert("viewShowTextControls", new ScrAction(ScApp, "viewShowTextControls"));
2863 fschmid 376
        scrActions->insert("viewRulerMode", new ScrAction(ScApp, "viewRulerMode"));
2170 cbradney 377
        scrActions->insert("viewSnapToGrid", new ScrAction(ScApp, "viewSnapToGrid"));
378
        scrActions->insert("viewSnapToGuides", new ScrAction(ScApp, "viewSnapToGuides"));
379
//      scrActions->insert("viewNewView", new ScrAction(ScApp, "viewNewView"));
1993 cbradney 380
 
381
        (*scrActions)["viewShowMargins"]->setToggleAction(true);
382
        (*scrActions)["viewShowFrames"]->setToggleAction(true);
383
        (*scrActions)["viewShowImages"]->setToggleAction(true);
384
        (*scrActions)["viewShowGrid"]->setToggleAction(true);
385
        (*scrActions)["viewShowGuides"]->setToggleAction(true);
386
        (*scrActions)["viewShowBaseline"]->setToggleAction(true);
387
        (*scrActions)["viewShowTextChain"]->setToggleAction(true);
2353 fschmid 388
        (*scrActions)["viewShowTextControls"]->setToggleAction(true);
2863 fschmid 389
        (*scrActions)["viewRulerMode"]->setToggleAction(true);
1993 cbradney 390
        (*scrActions)["viewSnapToGrid"]->setToggleAction(true);
391
        (*scrActions)["viewSnapToGuides"]->setToggleAction(true);
392
 
393
        (*scrActions)["viewShowMargins"]->setOn(true);
394
        (*scrActions)["viewShowFrames"]->setOn(true);
395
        (*scrActions)["viewShowImages"]->setOn(true);
396
        (*scrActions)["viewShowGuides"]->setOn(true);
2863 fschmid 397
        (*scrActions)["viewRulerMode"]->setOn(true);
1993 cbradney 398
 
399
        connect( (*scrActions)["viewFitInWindow"], SIGNAL(activatedData(double)), ScApp, SLOT(slotZoom(double)) );
400
        connect( (*scrActions)["viewFit50"], SIGNAL(activatedData(double)), ScApp, SLOT(slotZoom(double)) );
401
        connect( (*scrActions)["viewFit75"], SIGNAL(activatedData(double)), ScApp, SLOT(slotZoom(double)) );
402
        connect( (*scrActions)["viewFit100"], SIGNAL(activatedData(double)), ScApp, SLOT(slotZoom(double)) );
403
        connect( (*scrActions)["viewFit200"], SIGNAL(activatedData(double)), ScApp, SLOT(slotZoom(double)) );
404
        connect( (*scrActions)["viewFit20"], SIGNAL(activatedData(double)), ScApp, SLOT(slotZoom(double)) );
405
        connect( (*scrActions)["viewShowMargins"], SIGNAL(activated()), ScApp, SLOT(ToggleMarks()) );
406
        connect( (*scrActions)["viewShowFrames"], SIGNAL(activated()), ScApp, SLOT(ToggleFrames()) );
407
        connect( (*scrActions)["viewShowImages"], SIGNAL(activated()), ScApp, SLOT(TogglePics()) );
408
        connect( (*scrActions)["viewShowGrid"], SIGNAL(activated()), ScApp, SLOT(ToggleRaster()) );
409
        connect( (*scrActions)["viewShowGuides"], SIGNAL(activated()), ScApp, SLOT(ToggleGuides()) );
410
        connect( (*scrActions)["viewShowBaseline"], SIGNAL(activated()), ScApp, SLOT(ToggleBase()) );
411
        connect( (*scrActions)["viewShowTextChain"], SIGNAL(activated()), ScApp, SLOT(ToggleTextLinks()) );
2353 fschmid 412
        connect( (*scrActions)["viewShowTextControls"], SIGNAL(activated()), ScApp, SLOT(ToggleTextControls()) );
2863 fschmid 413
        connect( (*scrActions)["viewRulerMode"], SIGNAL(activated()), ScApp, SLOT(ToggleRuler()) );
1993 cbradney 414
        connect( (*scrActions)["viewSnapToGrid"], SIGNAL(activated()), ScApp, SLOT(ToggleURaster()) );
415
        connect( (*scrActions)["viewSnapToGuides"], SIGNAL(activated()), ScApp, SLOT(ToggleUGuides()) );
416
//      connect( (*scrActions)["viewNewView"], SIGNAL(activated()), ScApp, SLOT(newView()) );
417
 
418
}
419
 
420
void ActionManager::initToolsMenuActions()
421
{
422
        //Tool menu
3580 avox 423
        scrActions->insert("toolsProperties", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsProperties"));
424
        scrActions->insert("toolsOutline", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsOutline"));
425
        scrActions->insert("toolsScrapbook", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsScrapbook"));
426
        scrActions->insert("toolsLayers", new ScrAction(QIconSet(noIcon),"", QKeySequence(Key_F6), ScApp, "toolsLayers"));
427
        scrActions->insert("toolsPages", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsPages"));
428
        scrActions->insert("toolsBookmarks", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsBookmarks"));
3721 cbradney 429
        scrActions->insert("toolsMeasurements", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("dist.png"), loadIcon("dist22.png")), "", QKeySequence(), ScApp, "toolsMeasurements", modeMeasurementTool));
3580 avox 430
        scrActions->insert("toolsActionHistory", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsActionHistory"));
2170 cbradney 431
        scrActions->insert("toolsPreflightVerifier", new ScrAction(QIconSet(loadIcon("launch16.png"), loadIcon("launch.png")),"", QKeySequence(), ScApp, "toolsPreflightVerifier"));
3580 avox 432
        scrActions->insert("toolsAlignDistribute", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsAlignDistribute"));
433
        scrActions->insert("toolsToolbarTools", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsToolbarTools"));
434
        scrActions->insert("toolsToolbarPDF", new ScrAction(QIconSet(noIcon),"", QKeySequence(), ScApp, "toolsToolbarPDF"));
2246 subik 435
 
1993 cbradney 436
        //toolbar only items
2603 cbradney 437
        scrActions->insert("toolsSelect", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Kreuz.xpm"), loadIcon("Kreuz.xpm")), "", QKeySequence(Key_C), ScApp, "toolsSelect", modeNormal));
438
        scrActions->insert("toolsInsertTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Text16.xpm"), loadIcon("Text.xpm")), "", QKeySequence(Key_T), ScApp, "toolsInsertTextFrame", modeDrawText));
439
        scrActions->insert("toolsInsertImageFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Bild16.xpm"), loadIcon("Bild.xpm")), "", QKeySequence(Key_I), ScApp, "toolsInsertImageFrame", modeDrawPicture));
440
        scrActions->insert("toolsInsertTableFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("frame_table16.png"), loadIcon("frame_table.png")), "", QKeySequence(Key_A), ScApp, "toolsInsertTableFrame", modeDrawTable));
441
        scrActions->insert("toolsInsertShape", new ScrAction(ScrAction::DataInt,QIconSet(), "", QKeySequence(Key_S), ScApp, "toolsInsertShape", modeDrawShapes));
442
        scrActions->insert("toolsInsertPolygon", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("spline16.png"), loadIcon("spline.png")), "", QKeySequence(Key_P), ScApp, "toolsInsertPolygon", modeDrawRegularPolygon));
443
        scrActions->insert("toolsInsertLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stift16.xpm"), loadIcon("Stift.xpm")), "", QKeySequence(Key_L), ScApp, "toolsInsertLine", modeDrawLine));
444
        scrActions->insert("toolsInsertBezier", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("beziertool16.png"), loadIcon("beziertool.png")), "", QKeySequence(Key_B), ScApp, "toolsInsertBezier", modeDrawBezierLine));
445
        scrActions->insert("toolsInsertFreehandLine", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Stiftalt16.xpm"), loadIcon("Stiftalt.xpm")), "", QKeySequence(Key_F), ScApp, "toolsInsertFreehandLine", modeDrawFreehandLine));
2246 subik 446
 
2603 cbradney 447
        scrActions->insert("toolsRotate", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Rotieren.xpm"), loadIcon("Rotieren.xpm")), "", QKeySequence(Key_R), ScApp, "toolsRotate", modeRotation));
448
        scrActions->insert("toolsZoom", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lupe.xpm"), loadIcon("Lupe.xpm")), "", QKeySequence(Key_Z), ScApp, "toolsZoom", modeMagnifier));
3324 fschmid 449
        scrActions->insert("toolsZoomIn", new ScrAction(QIconSet(loadIcon("viewmagin.png"), loadIcon("viewmagin.png")), "", QKeySequence(CTRL+Key_Plus), ScApp, "toolsZoomIn"));
450
        scrActions->insert("toolsZoomOut", new ScrAction(QIconSet(loadIcon("viewmagout.png"), loadIcon("viewmagout.png")), "", QKeySequence(CTRL+Key_Minus), ScApp, "toolsZoomOut"));
2603 cbradney 451
        scrActions->insert("toolsEditContents", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Editm.xpm"), loadIcon("Editm.xpm")), "", QKeySequence(Key_E), ScApp, "toolsEditContents", modeEdit));
3345 fschmid 452
        scrActions->insert("toolsEditWithStoryEditor", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("signature2.png"), loadIcon("signature.png")), "", QKeySequence(CTRL+Key_Y), ScApp, "toolsEditWithStoryEditor", modeStoryEditor));
2603 cbradney 453
        scrActions->insert("toolsLinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Lock.xpm"), loadIcon("Lock.xpm")), "", QKeySequence(Key_N), ScApp, "toolsLinkTextFrame", modeLinkFrames));
454
        scrActions->insert("toolsUnlinkTextFrame", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("Unlock.xpm"), loadIcon("Unlock.xpm")), "", QKeySequence(Key_U), ScApp, "toolsUnlinkTextFrame", modeUnlinkFrames));
455
        scrActions->insert("toolsEyeDropper", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("colorpicker.png"), loadIcon("colorpicker.png")), "", QKeySequence(Key_Y), ScApp, "toolsEyeDropper", modeEyeDropper));
456
        scrActions->insert("toolsCopyProperties", new ScrAction(ScrAction::DataInt,QIconSet(loadIcon("wizard.png"), loadIcon("wizard.png")), "", QKeySequence(), ScApp, "toolsCopyProperties", modeCopyProperties));
2246 subik 457
 
1993 cbradney 458
        (*scrActions)["toolsProperties"]->setToggleAction(true);
459
        (*scrActions)["toolsOutline"]->setToggleAction(true);
460
        (*scrActions)["toolsScrapbook"]->setToggleAction(true);
461
        (*scrActions)["toolsLayers"]->setToggleAction(true);
462
        (*scrActions)["toolsPages"]->setToggleAction(true);
463
        (*scrActions)["toolsBookmarks"]->setToggleAction(true);
464
        (*scrActions)["toolsMeasurements"]->setToggleAction(true);
465
        (*scrActions)["toolsActionHistory"]->setToggleAction(true);
466
        (*scrActions)["toolsPreflightVerifier"]->setToggleAction(true);
2355 cbradney 467
        (*scrActions)["toolsAlignDistribute"]->setToggleAction(true);
1993 cbradney 468
        (*scrActions)["toolsToolbarTools"]->setToggleAction(true);
469
        (*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
2246 subik 470
 
1993 cbradney 471
        (*scrActions)["toolsSelect"]->setToggleAction(true);
472
        (*scrActions)["toolsInsertTextFrame"]->setToggleAction(true);
473
        (*scrActions)["toolsInsertImageFrame"]->setToggleAction(true);
474
        (*scrActions)["toolsInsertTableFrame"]->setToggleAction(true);
475
        (*scrActions)["toolsInsertShape"]->setToggleAction(true);
476
        (*scrActions)["toolsInsertPolygon"]->setToggleAction(true);
477
        (*scrActions)["toolsInsertLine"]->setToggleAction(true);
478
        (*scrActions)["toolsInsertBezier"]->setToggleAction(true);
479
        (*scrActions)["toolsInsertFreehandLine"]->setToggleAction(true);
480
        (*scrActions)["toolsRotate"]->setToggleAction(true);
481
        (*scrActions)["toolsZoom"]->setToggleAction(true);
482
        (*scrActions)["toolsEditContents"]->setToggleAction(true);
483
        (*scrActions)["toolsEditWithStoryEditor"]->setToggleAction(true);
484
        (*scrActions)["toolsLinkTextFrame"]->setToggleAction(true);
485
        (*scrActions)["toolsUnlinkTextFrame"]->setToggleAction(true);
486
        (*scrActions)["toolsEyeDropper"]->setToggleAction(true);
487
        (*scrActions)["toolsCopyProperties"]->setToggleAction(true);
2246 subik 488
 
1993 cbradney 489
        *modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame" << "toolsInsertTableFrame";
490
        *modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertLine" << "toolsInsertBezier";
491
        *modeActionNames << "toolsInsertFreehandLine" << "toolsRotate" << "toolsZoom" << "toolsEditContents";
492
        *modeActionNames << "toolsEditWithStoryEditor" << "toolsLinkTextFrame" << "toolsUnlinkTextFrame";
493
        *modeActionNames << "toolsEyeDropper" << "toolsCopyProperties";
494
 
2104 cbradney 495
        *nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
2246 subik 496
 
1993 cbradney 497
        connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), ScApp, SLOT(setUndoPalette(bool)) );
498
        connect( (*scrActions)["toolsToolbarTools"], SIGNAL(toggled(bool)), ScApp, SLOT(setTools(bool)) );
499
        connect( (*scrActions)["toolsToolbarPDF"], SIGNAL(toggled(bool)), ScApp, SLOT(setPDFTools(bool)) );
2246 subik 500
 
1993 cbradney 501
        connectModeActions();
502
}
503
 
504
void ActionManager::initExtrasMenuActions()
505
{
2170 cbradney 506
        scrActions->insert("extrasManagePictures", new ScrAction(ScApp, "extrasManagePictures"));
507
        scrActions->insert("extrasHyphenateText", new ScrAction(ScApp, "extrasHyphenateText"));
2621 fschmid 508
        scrActions->insert("extrasDeHyphenateText", new ScrAction(ScApp, "extrasDeHyphenateText"));
2170 cbradney 509
        scrActions->insert("extrasGenerateTableOfContents", new ScrAction(ScApp, "extrasGenerateTableOfContents"));
1993 cbradney 510
 
511
        connect( (*scrActions)["extrasManagePictures"], SIGNAL(activated()), ScApp, SLOT(StatusPic()) );
512
        connect( (*scrActions)["extrasHyphenateText"], SIGNAL(activated()), ScApp, SLOT(doHyphenate()) );
2621 fschmid 513
        connect( (*scrActions)["extrasDeHyphenateText"], SIGNAL(activated()), ScApp, SLOT(doDeHyphenate()) );
1993 cbradney 514
        connect( (*scrActions)["extrasGenerateTableOfContents"], SIGNAL(activated()), ScApp, SLOT(generateTableOfContents()) );
515
}
516
 
517
 
518
void ActionManager::initWindowsMenuActions()
519
{
3580 avox 520
        scrActions->insert("windowsCascade", new ScrAction( QIconSet(noIcon),"", QKeySequence(), ScApp, "windowsCascade"));
521
        scrActions->insert("windowsTile", new ScrAction( QIconSet(noIcon),"", QKeySequence(), ScApp, "windowstile"));
1993 cbradney 522
}
523
 
524
void ActionManager::initScriptMenuActions()
525
{
526
}
527
 
528
void ActionManager::initHelpMenuActions()
529
{
2170 cbradney 530
        scrActions->insert("helpAboutScribus", new ScrAction(ScApp, "helpAboutScribus"));
3247 craig 531
        scrActions->insert("helpAboutPlugins", new ScrAction(ScApp, "helpAboutPlugins"));
2170 cbradney 532
        scrActions->insert("helpAboutQt", new ScrAction(ScApp, "helpAboutQt"));
533
        scrActions->insert("helpTooltips", new ScrAction(ScApp, "helpTooltips"));
534
        scrActions->insert("helpManual", new ScrAction("", Key_F1, ScApp, "helpManual"));
1993 cbradney 535
 
536
        (*scrActions)["helpTooltips"]->setToggleAction(true);
537
        (*scrActions)["helpTooltips"]->setOn(true);
538
 
539
        connect( (*scrActions)["helpAboutScribus"], SIGNAL(activated()), ScApp, SLOT(slotHelpAbout()) );
3247 craig 540
        connect( (*scrActions)["helpAboutPlugins"], SIGNAL(activated()), ScApp, SLOT(slotHelpAboutPlugins()) );
1993 cbradney 541
        connect( (*scrActions)["helpAboutQt"], SIGNAL(activated()), ScApp, SLOT(slotHelpAboutQt()) );
542
        connect( (*scrActions)["helpTooltips"], SIGNAL(activated()), ScApp, SLOT(ToggleTips()) );
543
        connect( (*scrActions)["helpManual"], SIGNAL(activated()), ScApp, SLOT(slotOnlineHelp()) );
544
}
545
 
546
void ActionManager::initSpecialActions()
547
{
548
        //typography
2170 cbradney 549
        scrActions->insert("specialSmartHyphen", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+SHIFT+Key_Minus, ScApp, "specialSmartHyphen",-1));
2407 fschmid 550
        scrActions->insert("specialNonBreakingHyphen", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+ALT+Key_Minus, ScApp, "specialNonBreakingHyphen",24));
2170 cbradney 551
        scrActions->insert("specialNonBreakingSpace", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+Key_Space, ScApp, "specialNonBreakingSpace",29));
552
        scrActions->insert("specialPageNumber", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+SHIFT+ALT+Key_P, ScApp, "specialPageNumber",30));
2352 fschmid 553
        scrActions->insert("specialNewLine", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", SHIFT+Key_Return, ScApp, "specialNewLine",28));
554
        scrActions->insert("specialFrameBreak", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+Key_Return, ScApp, "specialFrameBreak",27));
2384 fschmid 555
        scrActions->insert("specialColumnBreak", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", CTRL+SHIFT+Key_Return, ScApp, "specialColumnBreak",26));
2170 cbradney 556
        scrActions->insert("specialCopyRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialCopyRight",0x0A9));
557
        scrActions->insert("specialRegdTM", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialRegdTM",0x00AE));
558
        scrActions->insert("specialTM", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialTM",0x2122));
559
        scrActions->insert("specialBullet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialBullet",0x2022));
560
        scrActions->insert("specialDashEm", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialDashEm",0x2014));
561
        scrActions->insert("specialDashEn", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialDashEn",0x2013));
562
        scrActions->insert("specialDashFigure", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialDashFigure",0x2012));
563
        scrActions->insert("specialDashQuotation", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialDashQuotation",0x2015));
2246 subik 564
 
2170 cbradney 565
        scrActions->insert("specialQuoteApostrophe", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteApostrophe",0x0027));
566
        scrActions->insert("specialQuoteStraight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteStraight",0x0022));
567
        scrActions->insert("specialQuoteSingleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteSingleLeft",0x2018));
568
        scrActions->insert("specialQuoteSingleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteSingleRight",0x2019));
569
        scrActions->insert("specialQuoteDoubleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteDoubleLeft",0x201C));
570
        scrActions->insert("specialQuoteDoubleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteDoubleRight",0x201D));
571
        scrActions->insert("specialQuoteSingleReversed", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteSingleReversed",0x201B));
572
        scrActions->insert("specialQuoteDoubleReversed", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteDoubleReversed",0x201F));
573
        scrActions->insert("specialQuoteSingleLeftGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteSingleLeftGuillemet",0x2039));
574
        scrActions->insert("specialQuoteSingleRightGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteSingleRightGuillemet",0x203A));
575
        scrActions->insert("specialQuoteDoubleLeftGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteDoubleLeftGuillemet",0x00AB));
576
        scrActions->insert("specialQuoteDoubleRightGuillemet", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteDoubleRightGuillemet",0x00BB));
577
        scrActions->insert("specialQuoteLowSingleComma", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteLowSingleComma",0x201A));
578
        scrActions->insert("specialQuoteLowDoubleComma", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteLowDoubleComma",0x201E));
3387 cbradney 579
        //scrActions->insert("specialQuoteDoubleTurnedComma", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteDoubleTurnedComma",0x201C));
2170 cbradney 580
        scrActions->insert("specialQuoteCJKSingleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteCJKSingleLeft",0x300C));
581
        scrActions->insert("specialQuoteCJKSingleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteCJKSingleRight",0x300D));
582
        scrActions->insert("specialQuoteCJKDoubleLeft", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteCJKDoubleLeft",0x300E));
583
        scrActions->insert("specialQuoteCJKDoubleRight", new ScrAction(ScrAction::UnicodeChar, QIconSet(), "", QKeySequence(), ScApp, "specialQuoteCJKDoubleRight",0x300F));
2246 subik 584
 
2391 cbradney 585
        //Spaces and special characters
2407 fschmid 586
        *unicodeCharActionNames << "specialSmartHyphen" << "specialNonBreakingHyphen" << "specialNonBreakingSpace" << "specialPageNumber";
2391 cbradney 587
        //Breaks
588
        *unicodeCharActionNames << "specialNewLine" << "specialFrameBreak" << "specialColumnBreak";
589
        //Copyrights and TMs
590
        *unicodeCharActionNames << "specialCopyRight" << "specialRegdTM" << "specialTM";
591
        //Bullets
1993 cbradney 592
        *unicodeCharActionNames << "specialBullet";
2391 cbradney 593
        //Dashes
1993 cbradney 594
        *unicodeCharActionNames << "specialDashEm" << "specialDashEn" << "specialDashFigure" << "specialDashQuotation";
2391 cbradney 595
        //Straight quotes
2039 cbradney 596
        *unicodeCharActionNames << "specialQuoteApostrophe" << "specialQuoteStraight";
2391 cbradney 597
        //Double quotes
1993 cbradney 598
        *unicodeCharActionNames << "specialQuoteDoubleLeft" << "specialQuoteDoubleRight" << "specialQuoteSingleLeft" << "specialQuoteSingleRight";
2391 cbradney 599
        //Alternative single quotes
2039 cbradney 600
        *unicodeCharActionNames << "specialQuoteSingleReversed" << "specialQuoteDoubleReversed";
2391 cbradney 601
        //French quotes
2039 cbradney 602
        *unicodeCharActionNames << "specialQuoteSingleLeftGuillemet" << "specialQuoteSingleRightGuillemet" << "specialQuoteDoubleLeftGuillemet" << "specialQuoteDoubleRightGuillemet";
2391 cbradney 603
        //German quotes
3387 cbradney 604
        *unicodeCharActionNames << "specialQuoteLowSingleComma" << "specialQuoteLowDoubleComma";// << "specialQuoteDoubleTurnedComma";
2391 cbradney 605
        //CJK Quotes
2039 cbradney 606
        *unicodeCharActionNames << "specialQuoteCJKSingleLeft" << "specialQuoteCJKSingleRight" << "specialQuoteCJKDoubleLeft" << "specialQuoteCJKDoubleRight";
2246 subik 607
 
1993 cbradney 608
        for ( QStringList::Iterator it = unicodeCharActionNames->begin(); it != unicodeCharActionNames->end(); ++it )
609
                connect( (*scrActions)[*it], SIGNAL(activatedUnicodeShortcut(QString, int)), ScApp, SLOT(specialActionKeyEvent(QString, int)) );
2039 cbradney 610
        enableUnicodeActions(false);
1993 cbradney 611
 
612
        //GUI
2170 cbradney 613
        scrActions->insert("specialToggleAllPalettes", new ScrAction(ScrAction::DataQString, QIconSet(), "", Key_F10, ScApp, "specialToggleAllPalettes",0,0.0,"specialToggleAllPalettes"));
614
        scrActions->insert("specialToggleAllGuides", new ScrAction(ScrAction::DataQString, QIconSet(), "", Key_F11, ScApp, "specialToggleAllGuides",0,0.0,"specialToggleAllGuides"));
1993 cbradney 615
 
616
        connect( (*scrActions)["specialToggleAllPalettes"], SIGNAL(activated()), ScApp, SLOT(ToggleAllPalettes()) );
617
        connect( (*scrActions)["specialToggleAllGuides"], SIGNAL(activated()), ScApp, SLOT(ToggleAllGuides()) );
618
}
619
 
620
void ActionManager::disconnectModeActions()
621
{
622
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
623
                disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , ScApp, SLOT(setAppModeByToggle(bool, int)) );
624
}
2246 subik 625
 
1993 cbradney 626
void ActionManager::connectModeActions()
627
{
628
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
629
                connect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , ScApp, SLOT(setAppModeByToggle(bool, int)) );
630
}
631
 
2026 cbradney 632
void ActionManager::disconnectNewViewActions()
633
{
634
        disconnect( (*scrActions)["toolsZoomIn"], 0, 0, 0);
635
        disconnect( (*scrActions)["toolsZoomOut"], 0, 0, 0);
2104 cbradney 636
        disconnect( (*scrActions)["itemLowerToBottom"], 0, 0, 0);
2026 cbradney 637
        disconnect( (*scrActions)["itemImageIsVisible"], 0, 0, 0);
2256 cbradney 638
        disconnect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)), 0, 0 );
639
        disconnect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)), 0,0 );
640
        disconnect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)), 0, 0 );
2026 cbradney 641
        disconnect( (*scrActions)["itemRaise"], 0, 0, 0);
642
        disconnect( (*scrActions)["itemLower"], 0, 0, 0);
643
        disconnect( (*scrActions)["itemCombinePolygons"], 0, 0, 0);
644
        disconnect( (*scrActions)["itemSplitPolygons"], 0, 0, 0);
645
        disconnect( (*scrActions)["itemConvertToBezierCurve"], 0, 0, 0);
646
        disconnect( (*scrActions)["itemConvertToImageFrame"], 0, 0, 0);
647
        disconnect( (*scrActions)["itemConvertToOutlines"], 0, 0, 0);
648
        disconnect( (*scrActions)["itemConvertToPolygon"], 0, 0, 0);
649
        disconnect( (*scrActions)["itemConvertToTextFrame"], 0, 0, 0);
650
        disconnect( (*scrActions)["itemAttachTextToPath"], 0, 0, 0);
651
        disconnect( (*scrActions)["itemDetachTextFromPath"], 0, 0, 0);
2108 cbradney 652
        disconnect( (*scrActions)["itemLock"], 0, 0, 0);
653
        disconnect( (*scrActions)["itemLockSize"], 0, 0, 0);
2259 cbradney 654
        disconnect( (*scrActions)["itemAdjustFrameToImage"], 0, 0, 0 );
2260 cbradney 655
        disconnect( (*scrActions)["itemUpdateImage"], 0, 0, 0 );
656
        disconnect( (*scrActions)["itemExtendedImageProperties"], 0, 0, 0 );
2026 cbradney 657
}
2246 subik 658
 
2026 cbradney 659
void ActionManager::connectNewViewActions(ScribusView *currView)
660
{
661
        if (currView==NULL)
662
                return;
663
        connect( (*scrActions)["toolsZoomIn"], SIGNAL(activated()) , currView, SLOT(slotZoomIn()) );
664
        connect( (*scrActions)["toolsZoomOut"], SIGNAL(activated()) , currView, SLOT(slotZoomOut()) );
2104 cbradney 665
        connect( (*scrActions)["itemLowerToBottom"], SIGNAL(activated()), currView, SLOT(ToBack()) );
666
        connect( (*scrActions)["itemRaiseToTop"], SIGNAL(activated()), currView, SLOT(ToFront()) );
2026 cbradney 667
        connect( (*scrActions)["itemRaise"], SIGNAL(activated()), currView, SLOT(RaiseItem()) );
668
        connect( (*scrActions)["itemLower"], SIGNAL(activated()), currView, SLOT(LowerItem()) );
669
        connect( (*scrActions)["itemCombinePolygons"], SIGNAL(activated()), currView, SLOT(UniteObj()) );
670
        connect( (*scrActions)["itemSplitPolygons"], SIGNAL(activated()), currView, SLOT(SplitObj()) );
671
        connect( (*scrActions)["itemConvertToBezierCurve"], SIGNAL(activated()), currView, SLOT(ToBezierFrame()) );
672
        connect( (*scrActions)["itemConvertToImageFrame"], SIGNAL(activated()), currView, SLOT(ToPicFrame()) );
673
        connect( (*scrActions)["itemConvertToOutlines"], SIGNAL(activated()), currView, SLOT(TextToPath()) );
674
        connect( (*scrActions)["itemConvertToPolygon"], SIGNAL(activated()), currView, SLOT(ToPolyFrame()) );
675
        connect( (*scrActions)["itemConvertToTextFrame"], SIGNAL(activated()), currView, SLOT(ToTextFrame()) );
676
        connect( (*scrActions)["itemAttachTextToPath"], SIGNAL(activated()), currView, SLOT(ToPathText()) );
677
        connect( (*scrActions)["itemDetachTextFromPath"], SIGNAL(activated()), currView, SLOT(FromPathText()) );
2108 cbradney 678
        connect( (*scrActions)["itemLock"], SIGNAL(activated()), currView, SLOT(ToggleLock()) );
679
        connect( (*scrActions)["itemLockSize"], SIGNAL(activated()), currView, SLOT(ToggleSizeLock()) );
2259 cbradney 680
        connect( (*scrActions)["itemAdjustFrameToImage"], SIGNAL(activated()), currView, SLOT(FrameToPic()) );
2260 cbradney 681
        connect( (*scrActions)["itemUpdateImage"], SIGNAL(activated()), currView, SLOT(UpdatePic()) );
682
        connect( (*scrActions)["itemExtendedImageProperties"], SIGNAL(activated()), currView, SLOT(editExtendedImageProperties()) );
2026 cbradney 683
}
684
 
685
void ActionManager::disconnectNewSelectionActions()
686
{
687
        disconnect( (*scrActions)["itemImageIsVisible"], 0, 0, 0);
2256 cbradney 688
        disconnect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)) , 0, 0 );
689
        disconnect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)) , 0, 0 );
690
        disconnect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)) , 0, 0 );
2026 cbradney 691
}
692
 
693
void ActionManager::connectNewSelectionActions(ScribusView *currView)
694
{
695
        connect( (*scrActions)["itemImageIsVisible"], SIGNAL(toggled(bool)) , currView, SLOT(TogglePic()) );
2256 cbradney 696
        connect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)) , currView, SLOT(changePreview(int)) );
697
        connect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)) , currView, SLOT(changePreview(int)) );
698
        connect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)) , currView, SLOT(changePreview(int)) );
2026 cbradney 699
}
2246 subik 700
 
1993 cbradney 701
void ActionManager::saveActionShortcutsPreEditMode()
702
{
703
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
704
                (*scrActions)[*it]->saveShortcut();
705
        for ( QStringList::Iterator it = nonEditActionNames->begin(); it != nonEditActionNames->end(); ++it )
2246 subik 706
                (*scrActions)[*it]->saveShortcut();
1993 cbradney 707
 
708
}
709
 
710
void ActionManager::restoreActionShortcutsPostEditMode()
711
{
712
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
713
                (*scrActions)[*it]->restoreShortcut();
714
        for ( QStringList::Iterator it = nonEditActionNames->begin(); it != nonEditActionNames->end(); ++it )
2246 subik 715
                (*scrActions)[*it]->restoreShortcut();
1993 cbradney 716
}
717
 
1995 cbradney 718
void ActionManager::enableActionStringList(QStringList *list, bool enabled, bool checkingUnicode)
1993 cbradney 719
{
720
        for ( QStringList::Iterator it = list->begin(); it != list->end(); ++it )
721
        {
722
                if(!checkingUnicode)
723
                        (*scrActions)[*it]->setEnabled(enabled);
724
                else
725
                {
726
                        //For UnicodeChar actions, only enable when the current font has that character.
727
                        if (ScApp->HaveDoc && (*scrActions)[*it]->actionType()==ScrAction::UnicodeChar)
728
                        {
729
                                int charCode=(*scrActions)[*it]->actionInt();
2246 subik 730
                                if(charCode==-1 ||
2407 fschmid 731
                                   charCode==24 ||
2384 fschmid 732
                                   charCode==26 ||
2352 fschmid 733
                                   charCode==27 ||
734
                                   charCode==28 ||
2246 subik 735
                                   charCode==29 ||
736
                                   charCode==30 ||
2039 cbradney 737
                                   (*ScApp->doc->AllFonts)[ScApp->doc->CurrFont]->CharWidth.contains(charCode) )
1993 cbradney 738
                                        (*scrActions)[*it]->setEnabled(enabled);
739
                        }
740
                }
741
        }
742
}
1995 cbradney 743
 
744
void ActionManager::enableUnicodeActions(bool enabled)
745
{
746
        enableActionStringList(unicodeCharActionNames, enabled, enabled);
747
}
2103 cbradney 748
 
2108 cbradney 749
void ActionManager::setPDFActions(ScribusView *currView)
2103 cbradney 750
{
2108 cbradney 751
        if (currView==NULL)
2103 cbradney 752
                return;
2108 cbradney 753
        PageItem* currItem = currView->SelItem.at(0);
2103 cbradney 754
        if (currItem==NULL)
755
                return;
756
 
757
        disconnect( (*scrActions)["itemPDFIsBookmark"], 0, 0, 0);
758
        disconnect( (*scrActions)["itemPDFIsAnnotation"], 0, 0, 0);
2246 subik 759
 
3625 avox 760
        if (!currItem->asTextFrame())
2103 cbradney 761
        {
762
                (*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
763
                (*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
764
                (*scrActions)["itemPDFIsAnnotation"]->setOn(false);
765
                (*scrActions)["itemPDFIsBookmark"]->setOn(false);
766
                (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
767
                (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
768
                return;
769
        }
770
 
771
        (*scrActions)["itemPDFIsAnnotation"]->setEnabled(true);
772
        (*scrActions)["itemPDFIsBookmark"]->setEnabled(true);
773
        (*scrActions)["itemPDFIsAnnotation"]->setOn(currItem->isAnnotation);
774
        (*scrActions)["itemPDFIsBookmark"]->setOn(currItem->isBookmark);
775
        if (currItem->isAnnotation)
776
        {
777
                bool setter=((currItem->AnType == 0) || (currItem->AnType == 1) || (currItem->AnType > 9));
778
                (*scrActions)["itemPDFAnnotationProps"]->setEnabled(setter);
779
                (*scrActions)["itemPDFFieldProps"]->setEnabled(!setter);
780
        }
781
        else
782
        {
783
                (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
784
                (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
785
        }
2108 cbradney 786
        connect( (*scrActions)["itemPDFIsAnnotation"], SIGNAL(activated()), currView, SLOT(ToggleAnnotation()) );
787
        connect( (*scrActions)["itemPDFIsBookmark"], SIGNAL(activated()), currView, SLOT(ToggleBookmark()) );
2103 cbradney 788
}
2161 cbradney 789
 
790
void ActionManager::languageChange()
791
{
2170 cbradney 792
        //File Menu
2352 fschmid 793
        (*scrActions)["fileNew"]->setTexts( tr("&New"));
794
        (*scrActions)["fileOpen"]->setTexts( tr("&Open..."));
795
        (*scrActions)["fileClose"]->setTexts( tr("&Close"));
796
        (*scrActions)["fileSave"]->setTexts( tr("&Save"));
797
        (*scrActions)["fileSaveAs"]->setTexts( tr("Save &As..."));
798
        (*scrActions)["fileRevert"]->setTexts( tr("Re&vert to Saved"));
799
        (*scrActions)["fileCollect"]->setTexts( tr("Collect for O&utput..."));
800
        (*scrActions)["fileImportText"]->setTexts( tr("Get Text..."));
801
        (*scrActions)["fileImportAppendText"]->setTexts( tr("Append &Text..."));
802
        (*scrActions)["fileImportImage"]->setTexts( tr("Get Image..."));
803
        (*scrActions)["fileExportText"]->setTexts( tr("Save &Text..."));
804
        (*scrActions)["fileExportAsEPS"]->setTexts( tr("Save Page as &EPS..."));
805
        (*scrActions)["fileExportAsPDF"]->setTexts( tr("Save as P&DF..."));
806
        (*scrActions)["fileDocSetup"]->setTexts( tr("Document &Setup..."));
807
        (*scrActions)["filePrint"]->setTexts( tr("&Print..."));
3165 fschmid 808
        (*scrActions)["PrintPreview"]->setTexts( tr("Print Previe&w"));
2352 fschmid 809
        (*scrActions)["fileQuit"]->setTexts( tr("&Quit"));
2170 cbradney 810
        //Edit Menu
2352 fschmid 811
        (*scrActions)["editUndoAction"]->setTexts( tr("&Undo"));
812
        (*scrActions)["editRedoAction"]->setTexts( tr("&Redo"));
813
        (*scrActions)["editActionMode"]->setTexts( tr("&Item Action Mode"));
814
        (*scrActions)["editCut"]->setTexts( tr("Cu&t"));
815
        (*scrActions)["editCopy"]->setTexts( tr("&Copy"));
816
        (*scrActions)["editPaste"]->setTexts( tr("&Paste"));
817
        (*scrActions)["editClearContents"]->setTexts( tr("C&lear Contents"));
818
        (*scrActions)["editSelectAll"]->setTexts( tr("Select &All"));
819
        (*scrActions)["editDeselectAll"]->setTexts( tr("&Deselect All"));
820
        (*scrActions)["editSearchReplace"]->setTexts( tr("&Search/Replace..."));
821
        (*scrActions)["editEditWithImageEditor"]->setTexts( tr("Edit Image..."));
822
        (*scrActions)["editColors"]->setTexts( tr("C&olors..."));
823
        (*scrActions)["editParaStyles"]->setTexts( tr("&Paragraph Styles..."));
824
        (*scrActions)["editLineStyles"]->setTexts( tr("&Line Styles..."));
825
        (*scrActions)["editMasterPages"]->setTexts( tr("&Master Pages..."));
3142 cbradney 826
        (*scrActions)["editJavascripts"]->setTexts( tr("&JavaScripts..."));
2352 fschmid 827
        (*scrActions)["editPreferences"]->setTexts( tr("P&references..."));
2246 subik 828
 
2170 cbradney 829
        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
830
        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
831
        for (uint s = 0; s < f_size; ++s)
832
        {
833
                QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
2352 fschmid 834
                (*scrActions)[fontSizeName]->setTexts( tr("%1 pt").arg(font_sizes[s]));
2170 cbradney 835
        }
2352 fschmid 836
        (*scrActions)["fontSizeOther"]->setTexts( tr("&Other..."));
837
        (*scrActions)["alignLeft"]->setTexts( tr("&Left"));
838
        (*scrActions)["alignCenter"]->setTexts( tr("&Center"));
839
        (*scrActions)["alignRight"]->setTexts( tr("&Right"));
840
        (*scrActions)["alignBlock"]->setTexts( tr("&Block"));
841
        (*scrActions)["alignForced"]->setTexts( tr("&Forced"));
2170 cbradney 842
 
843
        for (uint i=0; i<=100 ; i+=10)
844
        {
845
                QString shadeName=QString("shade%1").arg(i);
2352 fschmid 846
                (*scrActions)[shadeName]->setTexts( tr("&%1 %").arg(i));
2170 cbradney 847
        }
848
 
2352 fschmid 849
        (*scrActions)["shadeOther"]->setTexts( tr("&Other..."));
850
        (*scrActions)["typeEffectNormal"]->setTexts( tr("&Normal"));
851
        (*scrActions)["typeEffectUnderline"]->setTexts( tr("&Underline"));
852
        (*scrActions)["typeEffectUnderlineWords"]->setTexts( tr("Underline &Words"));
853
        (*scrActions)["typeEffectStrikeThrough"]->setTexts( tr("&Strike Through"));
854
        (*scrActions)["typeEffectAllCaps"]->setTexts( tr("&All Caps"));
855
        (*scrActions)["typeEffectSmallCaps"]->setTexts( tr("Small &Caps"));
856
        (*scrActions)["typeEffectSuperscript"]->setTexts( tr("Su&perscript"));
857
        (*scrActions)["typeEffectSubscript"]->setTexts( tr("Su&bscript"));
858
        (*scrActions)["typeEffectOutline"]->setTexts( tr("&Outline"));
859
        (*scrActions)["typeEffectShadow"]->setTexts( tr("S&hadow"));
2170 cbradney 860
 
2352 fschmid 861
        (*scrActions)["styleInvertPict"]->setTexts( tr("&Image Effects"));
862
        (*scrActions)["styleTabulators"]->setTexts( tr("&Tabulators..."));
2246 subik 863
 
2170 cbradney 864
        //Item Menu
2352 fschmid 865
        (*scrActions)["itemDuplicate"]->setTexts( tr("D&uplicate"));
866
        (*scrActions)["itemMulDuplicate"]->setTexts( tr("&Multiple Duplicate"));
867
        (*scrActions)["itemDelete"]->setTexts( tr("&Delete"));
868
        (*scrActions)["itemGroup"]->setTexts( tr("&Group"));
869
        (*scrActions)["itemUngroup"]->setTexts( tr("&Ungroup"));
870
        (*scrActions)["itemLock"]->setTexts( tr("Is &Locked"));
871
        (*scrActions)["itemLockSize"]->setTexts( tr("Si&ze is Locked"));
872
        (*scrActions)["itemLowerToBottom"]->setTexts( tr("Lower to &Bottom"));
873
        (*scrActions)["itemRaiseToTop"]->setTexts( tr("Raise to &Top"));
874
        (*scrActions)["itemLower"]->setTexts( tr("&Lower"));
875
        (*scrActions)["itemRaise"]->setTexts( tr("&Raise"));
876
        (*scrActions)["itemSendToScrapbook"]->setTexts( tr("Send to S&crapbook"));
877
        (*scrActions)["itemAttributes"]->setTexts( tr("&Attributes..."));
3706 fschmid 878
        (*scrActions)["itemImageInfo"]->setTexts( tr("More Info..."));
2352 fschmid 879
        (*scrActions)["itemImageIsVisible"]->setTexts( tr("I&mage Visible"));
880
        (*scrActions)["itemUpdateImage"]->setTexts( tr("&Update Image"));
881
        (*scrActions)["itemAdjustFrameToImage"]->setTexts( tr("Adjust Frame to Image"));
882
        (*scrActions)["itemExtendedImageProperties"]->setTexts( tr("Extended Image Properties"));
883
        (*scrActions)["itemPreviewLow"]->setTexts( tr("&Low Resolution"));
884
        (*scrActions)["itemPreviewNormal"]->setTexts( tr("&Normal Resolution"));
885
        (*scrActions)["itemPreviewFull"]->setTexts( tr("&Full Resolution"));
886
        (*scrActions)["itemPDFIsBookmark"]->setTexts( tr("Is PDF &Bookmark"));
887
        (*scrActions)["itemPDFIsAnnotation"]->setTexts( tr("Is PDF A&nnotation"));
888
        (*scrActions)["itemPDFAnnotationProps"]->setTexts( tr("Annotation P&roperties"));
889
        (*scrActions)["itemPDFFieldProps"]->setTexts( tr("Field P&roperties"));
890
        (*scrActions)["itemShapeEdit"]->setTexts( tr("&Edit Shape..."));
891
        (*scrActions)["itemAttachTextToPath"]->setTexts( tr("&Attach Text to Path"));
892
        (*scrActions)["itemDetachTextFromPath"]->setTexts( tr("&Detach Text from Path"));
893
        (*scrActions)["itemCombinePolygons"]->setTexts( tr("&Combine Polygons"));
894
        (*scrActions)["itemSplitPolygons"]->setTexts( tr("Split &Polygons"));
895
        (*scrActions)["itemConvertToBezierCurve"]->setTexts( tr("&Bezier Curve"));
896
        (*scrActions)["itemConvertToImageFrame"]->setTexts( tr("&Image Frame"));
897
        (*scrActions)["itemConvertToOutlines"]->setTexts( tr("&Outlines"));
898
        (*scrActions)["itemConvertToPolygon"]->setTexts( tr("&Polygon"));
899
        (*scrActions)["itemConvertToTextFrame"]->setTexts( tr("&Text Frame"));
2170 cbradney 900
 
901
        //Insert Menu
2352 fschmid 902
        (*scrActions)["insertGlyph"]->setTexts( tr("&Glyph..."));
903
        (*scrActions)["insertSampleText"]->setTexts( tr("Sample Text"));
2246 subik 904
 
2170 cbradney 905
        //Page menu
2352 fschmid 906
        (*scrActions)["pageInsert"]->setTexts( tr("&Insert..."));
907
        (*scrActions)["pageImport"]->setTexts( tr("Im&port..."));
908
        (*scrActions)["pageDelete"]->setTexts( tr("&Delete..."));
909
        (*scrActions)["pageCopy"]->setTexts( tr("&Copy..."));
910
        (*scrActions)["pageMove"]->setTexts( tr("&Move..."));
911
        (*scrActions)["pageApplyMasterPage"]->setTexts( tr("&Apply Master Page..."));
3187 fschmid 912
        (*scrActions)["pageCopyToMasterPage"]->setTexts( tr("Convert to Master Page..."));
2352 fschmid 913
        (*scrActions)["pageManageGuides"]->setTexts( tr("Manage &Guides..."));
2872 fschmid 914
        (*scrActions)["pageManageMargins"]->setTexts( tr("Manage Page Properties..."));
2246 subik 915
 
2170 cbradney 916
        //View Menu
2352 fschmid 917
        (*scrActions)["viewFitInWindow"]->setTexts( tr("&Fit in window"));
918
        (*scrActions)["viewFit50"]->setTexts( tr("&50%"));
919
        (*scrActions)["viewFit75"]->setTexts( tr("&75%"));
920
        (*scrActions)["viewFit100"]->setTexts( tr("&100%"));
921
        (*scrActions)["viewFit200"]->setTexts( tr("&200%"));
922
        (*scrActions)["viewFit20"]->setTexts( tr("&Thumbnails"));
923
        (*scrActions)["viewShowMargins"]->setTexts( tr("Show &Margins"));
924
        (*scrActions)["viewShowFrames"]->setTexts( tr("Show &Frames"));
925
        (*scrActions)["viewShowImages"]->setTexts( tr("Show &Images"));
926
        (*scrActions)["viewShowGrid"]->setTexts( tr("Show &Grid"));
927
        (*scrActions)["viewShowGuides"]->setTexts( tr("Show G&uides"));
928
        (*scrActions)["viewShowBaseline"]->setTexts( tr("Show &Baseline Grid"));
929
        (*scrActions)["viewShowTextChain"]->setTexts( tr("Show &Text Chain"));
2353 fschmid 930
        (*scrActions)["viewShowTextControls"]->setTexts( tr("Show Control Characters"));
2863 fschmid 931
        (*scrActions)["viewRulerMode"]->setTexts( tr("Rulers relative to Page"));
2352 fschmid 932
        (*scrActions)["viewSnapToGrid"]->setTexts( tr("Sn&ap to Grid"));
933
        (*scrActions)["viewSnapToGuides"]->setTexts( tr("Sna&p to Guides"));
934
//      (*scrActions)["viewNewView"]->setTexts( tr("New View"));
2170 cbradney 935
 
936
        //Tool menu
2352 fschmid 937
        (*scrActions)["toolsProperties"]->setTexts( tr("&Properties"));
938
        (*scrActions)["toolsOutline"]->setTexts( tr("&Outline"));
939
        (*scrActions)["toolsScrapbook"]->setTexts( tr("&Scrapbook"));
940
        (*scrActions)["toolsLayers"]->setTexts( tr("&Layers"));
2589 cbradney 941
        (*scrActions)["toolsPages"]->setTexts( tr("&Arrange Pages"));
2352 fschmid 942
        (*scrActions)["toolsBookmarks"]->setTexts( tr("&Bookmarks"));
943
        (*scrActions)["toolsMeasurements"]->setTexts( tr("&Measurements"));
944
        (*scrActions)["toolsActionHistory"]->setTexts( tr("Action &History"));
945
        (*scrActions)["toolsPreflightVerifier"]->setTexts( tr("Preflight &Verifier"));
2364 cbradney 946
        (*scrActions)["toolsAlignDistribute"]->setTexts( tr("&Align and Distribute"));
2352 fschmid 947
        (*scrActions)["toolsToolbarTools"]->setTexts( tr("&Tools"));
948
        (*scrActions)["toolsToolbarPDF"]->setTexts( tr("P&DF Tools"));
2246 subik 949
 
2170 cbradney 950
        //toolbar only items
2352 fschmid 951
        (*scrActions)["toolsSelect"]->setTexts( tr("Select Item"));
952
        (*scrActions)["toolsInsertTextFrame"]->setMenuText( tr("&Text Frame"));
953
        (*scrActions)["toolsInsertImageFrame"]->setMenuText( tr("&Image Frame"));
954
        (*scrActions)["toolsInsertTableFrame"]->setMenuText( tr("T&able"));
955
        (*scrActions)["toolsInsertShape"]->setMenuText( tr("&Shape"));
956
        (*scrActions)["toolsInsertPolygon"]->setMenuText( tr("&Polygon"));
957
        (*scrActions)["toolsInsertLine"]->setMenuText( tr("&Line"));
958
        (*scrActions)["toolsInsertBezier"]->setMenuText( tr("&Bezier Curve"));
959
        (*scrActions)["toolsInsertFreehandLine"]->setMenuText( tr("&Freehand Line"));
960
        (*scrActions)["toolsRotate"]->setTexts( tr("Rotate Item"));
961
        (*scrActions)["toolsZoom"]->setTexts( tr("Zoom in or out"));
962
        (*scrActions)["toolsZoomIn"]->setTexts( tr("Zoom in"));
963
        (*scrActions)["toolsZoomOut"]->setTexts( tr("Zoom out"));
964
        (*scrActions)["toolsEditContents"]->setTexts( tr("Edit Contents of Frame"));
965
        (*scrActions)["toolsEditWithStoryEditor"]->setMenuText( tr("Edit Text..."));
966
        (*scrActions)["toolsLinkTextFrame"]->setTexts( tr("Link Text Frames"));
967
        (*scrActions)["toolsUnlinkTextFrame"]->setTexts( tr("Unlink Text Frames"));
968
        (*scrActions)["toolsEyeDropper"]->setTexts( tr("&Eye Dropper"));
969
        (*scrActions)["toolsCopyProperties"]->setTexts( tr("Copy Item Properties"));
2246 subik 970
 
2352 fschmid 971
        (*scrActions)["toolsEditWithStoryEditor"]->setText( tr("Edit the text with the Story Editor"));
2246 subik 972
 
2352 fschmid 973
        (*scrActions)["toolsInsertTextFrame"]->setText( tr("Insert Text Frame"));
974
        (*scrActions)["toolsInsertImageFrame"]->setText( tr("Insert Image Frame"));
975
        (*scrActions)["toolsInsertTableFrame"]->setText( tr("Insert Table"));
976
        (*scrActions)["toolsInsertShape"]->setText( tr("Insert Shape"));
977
        (*scrActions)["toolsInsertPolygon"]->setText( tr("Insert Polygon"));
978
        (*scrActions)["toolsInsertLine"]->setText( tr("Insert Line"));
979
        (*scrActions)["toolsInsertBezier"]->setText( tr("Insert Bezier Curve"));
980
        (*scrActions)["toolsInsertFreehandLine"]->setText( tr("Insert Freehand Line"));
2170 cbradney 981
 
982
        //Extras Menu
2352 fschmid 983
        (*scrActions)["extrasManagePictures"]->setTexts( tr("&Manage Pictures"));
984
        (*scrActions)["extrasHyphenateText"]->setTexts( tr("&Hyphenate Text"));
2621 fschmid 985
        (*scrActions)["extrasDeHyphenateText"]->setTexts( tr("Dehyphenate Text"));
2352 fschmid 986
        (*scrActions)["extrasGenerateTableOfContents"]->setTexts( tr("&Generate Table Of Contents"));
2170 cbradney 987
 
3097 cbradney 988
        //Windows Menu
989
        (*scrActions)["windowsCascade"]->setMenuText( tr("&Cascade"));
990
        (*scrActions)["windowsTile"]->setMenuText( tr("&Tile"));
991
 
2170 cbradney 992
        //Help Menu
2352 fschmid 993
        (*scrActions)["helpAboutScribus"]->setTexts( tr("&About Scribus"));
3247 craig 994
        (*scrActions)["helpAboutPlugins"]->setTexts( tr("&About Plug-ins"));
2352 fschmid 995
        (*scrActions)["helpAboutQt"]->setTexts( tr("About &Qt"));
996
        (*scrActions)["helpTooltips"]->setTexts( tr("Toolti&ps"));
997
        (*scrActions)["helpManual"]->setTexts( tr("Scribus &Manual..."));
2170 cbradney 998
 
2246 subik 999
 
2170 cbradney 1000
        //typography
2352 fschmid 1001
        (*scrActions)["specialSmartHyphen"]->setMenuText( tr("Smart &Hyphen"));
2407 fschmid 1002
        (*scrActions)["specialNonBreakingHyphen"]->setMenuText( tr("Non Breaking Dash"));
2352 fschmid 1003
        (*scrActions)["specialNonBreakingSpace"]->setMenuText( tr("Non Breaking &Space"));
1004
        (*scrActions)["specialPageNumber"]->setMenuText( tr("Page &Number"));
1005
        (*scrActions)["specialNewLine"]->setMenuText( tr("New Line"));
1006
        (*scrActions)["specialFrameBreak"]->setMenuText( tr("Frame Break"));
2384 fschmid 1007
        (*scrActions)["specialColumnBreak"]->setMenuText( tr("Column Break"));
2352 fschmid 1008
        (*scrActions)["specialCopyRight"]->setTexts( tr("Copyright"));
1009
        (*scrActions)["specialRegdTM"]->setTexts( tr("Registered Trademark"));
1010
        (*scrActions)["specialTM"]->setTexts( tr("Trademark"));
1011
        (*scrActions)["specialBullet"]->setTexts( tr("Bullet"));
1012
        (*scrActions)["specialDashEm"]->setTexts( tr("Em Dash"));
1013
        (*scrActions)["specialDashEn"]->setTexts( tr("En Dash"));
1014
        (*scrActions)["specialDashFigure"]->setTexts( tr("Figure Dash"));
1015
        (*scrActions)["specialDashQuotation"]->setTexts( tr("Quotation Dash"));
2246 subik 1016
 
2352 fschmid 1017
        (*scrActions)["specialQuoteApostrophe"]->setTexts( tr("Apostrophe"));
1018
        (*scrActions)["specialQuoteStraight"]->setTexts( tr("Straight Double"));
1019
        (*scrActions)["specialQuoteSingleLeft"]->setTexts( tr("Single Left"));
1020
        (*scrActions)["specialQuoteSingleRight"]->setTexts( tr("Single Right"));
1021
        (*scrActions)["specialQuoteDoubleLeft"]->setTexts( tr("Double Left"));
1022
        (*scrActions)["specialQuoteDoubleRight"]->setTexts( tr("Double Right"));
1023
        (*scrActions)["specialQuoteSingleReversed"]->setTexts( tr("Single Reversed"));
1024
        (*scrActions)["specialQuoteDoubleReversed"]->setTexts( tr("Double Reversed"));
1025
        (*scrActions)["specialQuoteSingleLeftGuillemet"]->setTexts( tr("Single Left Guillemet"));
1026
        (*scrActions)["specialQuoteSingleRightGuillemet"]->setTexts( tr("Single Right Guillemet"));
1027
        (*scrActions)["specialQuoteDoubleLeftGuillemet"]->setTexts( tr("Double Left Guillemet"));
1028
        (*scrActions)["specialQuoteDoubleRightGuillemet"]->setTexts( tr("Double Right Guillemet"));
1029
        (*scrActions)["specialQuoteLowSingleComma"]->setTexts( tr("Low Single Comma"));
1030
        (*scrActions)["specialQuoteLowDoubleComma"]->setTexts( tr("Low Double Comma"));
3387 cbradney 1031
        //(*scrActions)["specialQuoteDoubleTurnedComma"]->setTexts( tr("Double Turned Comma"));
2352 fschmid 1032
        (*scrActions)["specialQuoteCJKSingleLeft"]->setTexts( tr("CJK Single Left"));
1033
        (*scrActions)["specialQuoteCJKSingleRight"]->setTexts( tr("CJK Single Right"));
1034
        (*scrActions)["specialQuoteCJKDoubleLeft"]->setTexts( tr("CJK Double Left"));
1035
        (*scrActions)["specialQuoteCJKDoubleRight"]->setTexts( tr("CJK Double Right"));
2246 subik 1036
 
2170 cbradney 1037
        (*scrActions)["specialSmartHyphen"]->setText("Insert Smart Hyphen");
2407 fschmid 1038
        (*scrActions)["specialNonBreakingHyphen"]->setText("Insert Non Breaking Dash");
2170 cbradney 1039
        (*scrActions)["specialNonBreakingSpace"]->setText("Insert Non Breaking Space");
1040
        (*scrActions)["specialPageNumber"]->setText("Insert Page Number");
2352 fschmid 1041
        (*scrActions)["specialNewLine"]->setText("New Line");
1042
        (*scrActions)["specialFrameBreak"]->setText("Frame Break");
2384 fschmid 1043
        (*scrActions)["specialColumnBreak"]->setText( "Column Break");
2170 cbradney 1044
 
1045
        //GUI
2352 fschmid 1046
        (*scrActions)["specialToggleAllPalettes"]->setTexts( tr("Toggle Palettes"));
1047
        (*scrActions)["specialToggleAllGuides"]->setTexts( tr("Toggle Guides"));
2161 cbradney 1048
}
2256 cbradney 1049