Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
1993 cbradney 7
/***************************************************************************
8
        begin                : Apr 2005
9
        copyright            : (C) 2005 by Craig Bradney
10
        email                : cbradney@zip.com.au
11
***************************************************************************/
12
 
13
/***************************************************************************
14
*                                                                         *
5243 cbradney 15
*   mainWindow program is free software; you can redistribute it and/or modify  *
1993 cbradney 16
*   it under the terms of the GNU General Public License as published by  *
17
*   the Free Software Foundation; either version 2 of the License, or     *
18
*   (at your option) any later version.                                   *
19
*                                                                         *
20
***************************************************************************/
21
 
22
#include "actionmanager.h"
23
 
24
#include "scribus.h"
4688 cbradney 25
#include "scribusdoc.h"
2026 cbradney 26
#include "scribusview.h"
3934 cbradney 27
#include "selection.h"
1993 cbradney 28
#include "undomanager.h"
3809 cbradney 29
#include "util.h"
6996 avox 30
#include "text/storytext.h"
1993 cbradney 31
 
5243 cbradney 32
QMap<QString, QKeySequence> ActionManager::defKeys;
9857 cbradney 33
QVector< QPair<QString, QStringList> > ActionManager::defMenus;
34
QVector< QPair<QString, QStringList> > ActionManager::defNonMenuActions;
5243 cbradney 35
 
7087 subik 36
ActionManager::ActionManager ( QObject * parent, const char * name ) :
5781 cbradney 37
        QObject ( parent, name ),
38
        mainWindow(0)
1993 cbradney 39
{
5257 cbradney 40
}
41
 
8246 cbradney 42
ActionManager::~ActionManager()
43
{
9911 cbradney 44
        while (!scrActions->isEmpty())
45
        {
46
                ScrAction *value = (*scrActions->begin());
47
                scrActions->erase(scrActions->begin());
48
                delete value;
49
        }
50
        scrActions->clear();
8246 cbradney 51
        delete modeActionNames;
52
        delete nonEditActionNames;
53
        delete unicodeCharActionNames;
54
}
55
 
5257 cbradney 56
void ActionManager::init(ScribusMainWindow *mw)
57
{
58
        mainWindow=mw;
5243 cbradney 59
        scrActions=&(mainWindow->scrActions);
60
        scrActionGroups=&(mainWindow->scrActionGroups);
1995 cbradney 61
        modeActionNames=new QStringList();
62
        nonEditActionNames=new QStringList();
63
        unicodeCharActionNames=new QStringList();
1993 cbradney 64
        undoManager = UndoManager::instance();
2246 subik 65
 
3580 avox 66
#ifdef Q_WS_MAC
67
        noIcon = loadIcon("noicon.xpm");
68
#endif
7087 subik 69
 
1993 cbradney 70
        createActions();
2161 cbradney 71
        languageChange();
1993 cbradney 72
}
73
 
74
void ActionManager::createActions()
75
{
76
        initFileMenuActions();
77
        initEditMenuActions();
78
        initStyleMenuActions();
79
        initItemMenuActions();
80
        initInsertMenuActions();
81
        initPageMenuActions();
82
        initViewMenuActions();
83
        initToolsMenuActions();
84
        initExtrasMenuActions();
85
        initWindowsMenuActions();
86
        initScriptMenuActions();
87
        initHelpMenuActions();
5243 cbradney 88
        initUnicodeActions(scrActions, mainWindow, unicodeCharActionNames);
4881 cbradney 89
        enableUnicodeActions(scrActions, false);
1993 cbradney 90
        initSpecialActions();
91
}
92
 
93
void ActionManager::initFileMenuActions()
94
{
5243 cbradney 95
        QString name;
1993 cbradney 96
        //File Menu
5243 cbradney 97
        name="fileNew";
9857 cbradney 98
        scrActions->insert(name, new ScrAction(loadIcon("16/document-new.png"), loadIcon("22/document-new.png"), "", defKeys[name], mainWindow));
5243 cbradney 99
        name="fileOpen";
9857 cbradney 100
        scrActions->insert(name, new ScrAction(loadIcon("16/document-open.png"), loadIcon("22/document-open.png"), "", defKeys[name], mainWindow));
5243 cbradney 101
        name="fileClose";
9857 cbradney 102
        scrActions->insert(name, new ScrAction(loadIcon("16/close.png"), loadIcon("22/close.png"), "", defKeys[name], mainWindow));
5243 cbradney 103
        name="fileSave";
9857 cbradney 104
        scrActions->insert(name, new ScrAction(loadIcon("16/document-save.png"), loadIcon("22/document-save.png"), "", defKeys[name], mainWindow));
5243 cbradney 105
        name="fileSaveAs";
9857 cbradney 106
        scrActions->insert(name, new ScrAction(loadIcon("16/document-save-as.png"), loadIcon("22/document-save-as.png"), "", defKeys[name], mainWindow));
5243 cbradney 107
        name="fileRevert";
9857 cbradney 108
        scrActions->insert(name, new ScrAction(loadIcon("revert.png"), QPixmap(), "", defKeys[name], mainWindow));
5243 cbradney 109
        name="fileCollect";
9857 cbradney 110
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 111
        //File Import Menu
5243 cbradney 112
        name="fileImportText";
9857 cbradney 113
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5715 tsoots 114
        name="fileImportText2";
9857 cbradney 115
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 116
        name="fileImportAppendText";
9857 cbradney 117
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 118
        name="fileImportImage";
9857 cbradney 119
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 120
 
121
        //File Export Menu
5243 cbradney 122
        name="fileExportText";
9857 cbradney 123
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 124
        name="fileExportAsEPS";
9857 cbradney 125
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 126
        name="fileExportAsPDF";
9857 cbradney 127
        scrActions->insert(name, new ScrAction(loadIcon("acroread16.png"), loadIcon("acroread22.png"), "", defKeys[name], mainWindow));
1993 cbradney 128
        //Rest of File Menu
5243 cbradney 129
        name="fileDocSetup";
9857 cbradney 130
        scrActions->insert(name, new ScrAction(loadIcon("16/document-properties.png"), loadIcon("22/document-properties.png"), "", defKeys[name], mainWindow));
5713 cbradney 131
        name="filePreferences";
9857 cbradney 132
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 133
        name="filePrint";
9857 cbradney 134
        scrActions->insert(name, new ScrAction(loadIcon("16/document-print.png"), loadIcon("22/document-print.png"), "", defKeys[name], mainWindow));
5243 cbradney 135
        name="PrintPreview";
9857 cbradney 136
        scrActions->insert(name, new ScrAction(loadIcon("16/document-print-preview.png"), loadIcon("22/document-print-preview.png"), "", defKeys[name], mainWindow));
5243 cbradney 137
        name="fileQuit";
9857 cbradney 138
        scrActions->insert(name, new ScrAction(loadIcon("exit.png"), QPixmap(), "", defKeys[name], mainWindow));
1993 cbradney 139
 
140
        //Connect our signals and slots
141
        //File Menu
5243 cbradney 142
        connect( (*scrActions)["fileNew"], SIGNAL(activated()), mainWindow, SLOT(slotFileNew()) );
143
        connect( (*scrActions)["fileOpen"], SIGNAL(activated()), mainWindow, SLOT(slotDocOpen()) );
144
        connect( (*scrActions)["fileClose"], SIGNAL(activated()), mainWindow, SLOT(slotFileClose()) );
145
        connect( (*scrActions)["filePrint"], SIGNAL(activated()), mainWindow, SLOT(slotFilePrint()) );
146
        connect( (*scrActions)["PrintPreview"], SIGNAL(activated()), mainWindow, SLOT(printPreview()) );
147
        connect( (*scrActions)["fileSave"], SIGNAL(activated()), mainWindow, SLOT(slotFileSave()) );
148
        connect( (*scrActions)["fileSaveAs"], SIGNAL(activated()), mainWindow, SLOT(slotFileSaveAs()) );
149
        connect( (*scrActions)["fileDocSetup"], SIGNAL(activated()), mainWindow, SLOT(slotDocSetup()) );
5713 cbradney 150
        connect( (*scrActions)["filePreferences"], SIGNAL(activated()), mainWindow, SLOT(slotPrefsOrg()) );
5243 cbradney 151
        connect( (*scrActions)["fileRevert"], SIGNAL(activated()), mainWindow, SLOT(slotFileRevert()) );
152
        connect( (*scrActions)["fileCollect"], SIGNAL(activated()), mainWindow, SLOT(Collect()) );
153
        connect( (*scrActions)["fileQuit"], SIGNAL(activated()), mainWindow, SLOT(slotFileQuit()) );
1993 cbradney 154
        //File Import Menu
5243 cbradney 155
        connect( (*scrActions)["fileImportText"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent()) );
5715 tsoots 156
        connect( (*scrActions)["fileImportText2"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent2()) );
5243 cbradney 157
        connect( (*scrActions)["fileImportAppendText"], SIGNAL(activated()), mainWindow, SLOT(slotFileAppend()) );
158
        connect( (*scrActions)["fileImportImage"], SIGNAL(activated()), mainWindow, SLOT(slotGetContent()) );
1993 cbradney 159
        //File Export Menu
5243 cbradney 160
        connect( (*scrActions)["fileExportText"], SIGNAL(activated()), mainWindow, SLOT(SaveText()) );
161
        connect( (*scrActions)["fileExportAsEPS"], SIGNAL(activated()), mainWindow, SLOT(SaveAsEps()) );
162
        connect( (*scrActions)["fileExportAsPDF"], SIGNAL(activated()), mainWindow, SLOT(SaveAsPDF()) );
1993 cbradney 163
        //The rest are plugins
164
}
165
 
166
void ActionManager::initEditMenuActions()
167
{
5243 cbradney 168
        QString name;
1993 cbradney 169
        //Edit Menu
5243 cbradney 170
        name="editUndoAction";
9857 cbradney 171
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/edit-undo.png"), loadIcon("22/edit-undo.png"), "", defKeys[name], mainWindow, 1));
5243 cbradney 172
        name="editRedoAction";
9857 cbradney 173
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/edit-redo.png"), loadIcon("22/edit-redo.png"), "", defKeys[name], mainWindow, 1));
5243 cbradney 174
        name="editActionMode";
9857 cbradney 175
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 176
        (*scrActions)["editActionMode"]->setToggleAction(true);
7087 subik 177
 
5243 cbradney 178
        name="editCut";
9857 cbradney 179
        scrActions->insert(name, new ScrAction(loadIcon("16/edit-cut.png"), loadIcon("22/edit-cut.png"), "", defKeys[name], mainWindow));
5243 cbradney 180
        name="editCopy";
9857 cbradney 181
        scrActions->insert(name, new ScrAction(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png"), "", defKeys[name], mainWindow));
5243 cbradney 182
        name="editPaste";
9857 cbradney 183
        scrActions->insert(name, new ScrAction(loadIcon("16/edit-paste.png"), loadIcon("22/edit-paste.png"), "", defKeys[name], mainWindow));
5243 cbradney 184
        name="editCopyContents";
9857 cbradney 185
        scrActions->insert(name, new ScrAction(loadIcon("16/edit-copy.png"), loadIcon("22/edit-copy.png"), "", defKeys[name], mainWindow));
5243 cbradney 186
        name="editPasteContents";
9857 cbradney 187
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/edit-paste.png"), QPixmap(), "", defKeys[name], mainWindow, 0));
5243 cbradney 188
        name="editPasteContentsAbs";
9857 cbradney 189
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/edit-paste.png"), QPixmap(), "", defKeys[name], mainWindow, 1));
5243 cbradney 190
        name="editClearContents";
9857 cbradney 191
        scrActions->insert(name, new ScrAction(loadIcon("16/edit-delete.png"), loadIcon("22/edit-delete.png"), "", defKeys[name], mainWindow));
5243 cbradney 192
        name="editSelectAll";
9857 cbradney 193
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 194
        name="editDeselectAll";
9857 cbradney 195
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 196
        name="editSearchReplace";
9857 cbradney 197
        scrActions->insert(name, new ScrAction(loadIcon("16/edit-find-replace.png"), loadIcon("22/edit-find-replace.png"), "", defKeys[name], mainWindow));
5243 cbradney 198
        name="editEditWithImageEditor";
9857 cbradney 199
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 200
        name="editColors";
9857 cbradney 201
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
6368 fschmid 202
        name="editPatterns";
9857 cbradney 203
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 204
        name="editStyles";
9857 cbradney 205
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 206
        name="editMasterPages";
9857 cbradney 207
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 208
        name="editJavascripts";
9857 cbradney 209
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
2264 subik 210
 
4829 tsoots 211
        (*scrActions)["editStyles"]->setToggleAction(true);
212
 
1993 cbradney 213
        connect( (*scrActions)["editUndoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(undo(int)) );
214
        connect( (*scrActions)["editRedoAction"], SIGNAL(activatedData(int)) , undoManager, SLOT(redo(int)) );
5243 cbradney 215
        connect( (*scrActions)["editActionMode"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoMode(bool)) );
216
        connect( (*scrActions)["editCut"], SIGNAL(activated()), mainWindow, SLOT(slotEditCut()) );
217
        connect( (*scrActions)["editCopy"], SIGNAL(activated()), mainWindow, SLOT(slotEditCopy()) );
218
        connect( (*scrActions)["editPaste"], SIGNAL(activated()), mainWindow, SLOT(slotEditPaste()) );
219
        connect( (*scrActions)["editCopyContents"], SIGNAL(activated()), mainWindow, SLOT(slotEditCopyContents()) );
220
        connect( (*scrActions)["editPasteContents"], SIGNAL(activatedData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
221
        connect( (*scrActions)["editPasteContentsAbs"], SIGNAL(activatedData(int)), mainWindow, SLOT(slotEditPasteContents(int)) );
222
        connect( (*scrActions)["editSelectAll"], SIGNAL(activated()), mainWindow, SLOT(SelectAll()) );
223
        connect( (*scrActions)["editDeselectAll"], SIGNAL(activated()), mainWindow, SLOT(deselectAll()) );
224
        connect( (*scrActions)["editSearchReplace"], SIGNAL(activated()), mainWindow, SLOT(SearchText()) );
225
        connect( (*scrActions)["editEditWithImageEditor"], SIGNAL(activated()), mainWindow, SLOT(callImageEditor()) );
226
        connect( (*scrActions)["editColors"], SIGNAL(activated()), mainWindow, SLOT(slotEditColors()) );
6368 fschmid 227
        connect( (*scrActions)["editPatterns"], SIGNAL(activated()), mainWindow, SLOT(managePatterns()) );
8005 cbradney 228
//      connect( (*scrActions)["editStyles"], SIGNAL(activated()), mainWindow, SLOT(slotStyleManager()) );
5243 cbradney 229
        connect( (*scrActions)["editMasterPages"], SIGNAL(activated()), mainWindow, SLOT(manageMasterPages()) );
230
        connect( (*scrActions)["editJavascripts"], SIGNAL(activated()), mainWindow, SLOT(ManageJava()) );
1993 cbradney 231
}
232
 
233
void ActionManager::initStyleMenuActions()
234
{
5243 cbradney 235
        QString name;
1993 cbradney 236
        //Text Size actions
9857 cbradney 237
        (*scrActionGroups).insert("fontSize", new QActionGroup(mainWindow));
5243 cbradney 238
        name="fontSizeOther";
9911 cbradney 239
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("fontSize"), -1));
5243 cbradney 240
        connect( (*scrActions)["fontSizeOther"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemFSize(int)));
1993 cbradney 241
 
242
        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
243
        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
244
        for (uint s = 0; s < f_size; ++s)
245
        {
246
                QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
9911 cbradney 247
                scrActions->insert(fontSizeName, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("fontSize"), font_sizes[s]));
1993 cbradney 248
                (*scrActions)[fontSizeName]->setToggleAction(true);
5243 cbradney 249
                connect( (*scrActions)[fontSizeName], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemFSize(int)));
1993 cbradney 250
        }
251
 
252
        //Alignment actions
5243 cbradney 253
        name="alignLeft";
9857 cbradney 254
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0));
5243 cbradney 255
        name="alignCenter";
9857 cbradney 256
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 1));
5243 cbradney 257
        name="alignRight";
9857 cbradney 258
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 2));
5243 cbradney 259
        name="alignBlock";
9857 cbradney 260
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 3));
5243 cbradney 261
        name="alignForced";
9857 cbradney 262
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 4));
1993 cbradney 263
 
264
        (*scrActions)["alignLeft"]->setToggleAction(true);
265
        (*scrActions)["alignCenter"]->setToggleAction(true);
266
        (*scrActions)["alignRight"]->setToggleAction(true);
267
        (*scrActions)["alignBlock"]->setToggleAction(true);
268
        (*scrActions)["alignForced"]->setToggleAction(true);
269
 
5774 avox 270
        connect( (*scrActions)["alignLeft"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
271
        connect( (*scrActions)["alignCenter"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
272
        connect( (*scrActions)["alignRight"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
273
        connect( (*scrActions)["alignBlock"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
274
        connect( (*scrActions)["alignForced"], SIGNAL(activatedData(int)), mainWindow, SLOT(setNewAlignment(int)));
1993 cbradney 275
 
276
        //Shade actions
9857 cbradney 277
        scrActionGroups->insert("shade", new QActionGroup(mainWindow));
5243 cbradney 278
        name="shadeOther";
9911 cbradney 279
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("shade"), -1));
5243 cbradney 280
        connect( (*scrActions)["shadeOther"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemShade(int)));
1993 cbradney 281
        for (uint i=0; i<=100 ; i+=10)
282
        {
283
                QString shadeName=QString("shade%1").arg(i);
9911 cbradney 284
                scrActions->insert(shadeName, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("shade"), i));
1993 cbradney 285
                (*scrActions)[shadeName]->setToggleAction(true);
5243 cbradney 286
                connect( (*scrActions)[shadeName], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemShade(int)));
1993 cbradney 287
        }
288
 
289
        //Type Effects actions
9857 cbradney 290
        scrActionGroups->insert("typeEffects", new QActionGroup(mainWindow));
5243 cbradney 291
        name="typeEffectNormal";
9911 cbradney 292
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 0));
5243 cbradney 293
        name="typeEffectUnderline";
9911 cbradney 294
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 1));
5243 cbradney 295
        name="typeEffectUnderlineWords";
9911 cbradney 296
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 8));
5243 cbradney 297
        name="typeEffectStrikeThrough";
9911 cbradney 298
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 2));
5243 cbradney 299
        name="typeEffectAllCaps";
9911 cbradney 300
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 7));
5243 cbradney 301
        name="typeEffectSmallCaps";
9911 cbradney 302
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 3));
5243 cbradney 303
        name="typeEffectSuperscript";
9911 cbradney 304
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 4));
5243 cbradney 305
        name="typeEffectSubscript";
9911 cbradney 306
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 5));
5243 cbradney 307
        name="typeEffectOutline";
9911 cbradney 308
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 6));
5243 cbradney 309
        name="typeEffectShadow";
9911 cbradney 310
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], (*scrActionGroups).value("typeEffects"), 9));
1993 cbradney 311
        (*scrActions)["typeEffectNormal"]->setToggleAction(true);
312
        (*scrActions)["typeEffectUnderline"]->setToggleAction(true);
2188 fschmid 313
        (*scrActions)["typeEffectUnderlineWords"]->setToggleAction(true);
1993 cbradney 314
        (*scrActions)["typeEffectStrikeThrough"]->setToggleAction(true);
2185 fschmid 315
        (*scrActions)["typeEffectAllCaps"]->setToggleAction(true);
1993 cbradney 316
        (*scrActions)["typeEffectSmallCaps"]->setToggleAction(true);
317
        (*scrActions)["typeEffectSuperscript"]->setToggleAction(true);
318
        (*scrActions)["typeEffectSubscript"]->setToggleAction(true);
319
        (*scrActions)["typeEffectOutline"]->setToggleAction(true);
2229 fschmid 320
        (*scrActions)["typeEffectShadow"]->setToggleAction(true);
5243 cbradney 321
        connect( (*scrActions)["typeEffectNormal"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
322
        connect( (*scrActions)["typeEffectUnderline"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
323
        connect( (*scrActions)["typeEffectUnderlineWords"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
324
        connect( (*scrActions)["typeEffectStrikeThrough"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
325
        connect( (*scrActions)["typeEffectSmallCaps"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
326
        connect( (*scrActions)["typeEffectAllCaps"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
327
        connect( (*scrActions)["typeEffectSuperscript"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
328
        connect( (*scrActions)["typeEffectSubscript"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
329
        connect( (*scrActions)["typeEffectOutline"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
330
        connect( (*scrActions)["typeEffectShadow"], SIGNAL(activatedData(int)), mainWindow, SLOT(setItemTypeStyle(int)));
1993 cbradney 331
 
332
        //Other Style menu items that get added in various places
5243 cbradney 333
        name="styleImageEffects";
9857 cbradney 334
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 335
        name="styleTabulators";
9857 cbradney 336
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 337
        connect( (*scrActions)["styleImageEffects"], SIGNAL(activated()), mainWindow, SLOT(ImageEffects()));
338
        connect( (*scrActions)["styleTabulators"], SIGNAL(activated()), mainWindow, SLOT(EditTabs()));
1993 cbradney 339
 
340
}
341
 
342
void ActionManager::initItemMenuActions()
343
{
5243 cbradney 344
        QString name;
1993 cbradney 345
        //Item Menu
5243 cbradney 346
        name="itemDuplicate";
9857 cbradney 347
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 348
        name="itemMulDuplicate";
9857 cbradney 349
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 350
        name="itemDelete";
9857 cbradney 351
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 352
        name="itemGroup";
9857 cbradney 353
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 354
        name="itemUngroup";
9857 cbradney 355
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 356
        name="itemLock";
9857 cbradney 357
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 358
        name="itemLockSize";
9857 cbradney 359
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 360
        name="itemPrintingEnabled";
9857 cbradney 361
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 362
        name="itemFlipH";
9857 cbradney 363
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 364
        name="itemFlipV";
9857 cbradney 365
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
4695 cbradney 366
        (*scrActions)["itemLock"]->setToggleAction(true, true);
367
        (*scrActions)["itemLockSize"]->setToggleAction(true, true);
4698 cbradney 368
        (*scrActions)["itemPrintingEnabled"]->setToggleAction(true, true);
4699 cbradney 369
        (*scrActions)["itemFlipH"]->setToggleAction(true, true);
370
        (*scrActions)["itemFlipV"]->setToggleAction(true, true);
5243 cbradney 371
        name="itemLowerToBottom";
9857 cbradney 372
        scrActions->insert(name, new ScrAction(loadIcon("16/go-bottom.png"), loadIcon("22/go-bottom.png"), "", defKeys[name], mainWindow));
5243 cbradney 373
        name="itemRaiseToTop";
9857 cbradney 374
        scrActions->insert(name, new ScrAction(loadIcon("16/go-top.png"), loadIcon("22/go-top.png"), "", defKeys[name], mainWindow));
5243 cbradney 375
        name="itemLower";
9857 cbradney 376
        scrActions->insert(name, new ScrAction(loadIcon("16/go-down.png"), loadIcon("22/go-down.png"), "", defKeys[name], mainWindow));
5243 cbradney 377
        name="itemRaise";
9857 cbradney 378
        scrActions->insert(name, new ScrAction(loadIcon("16/go-up.png"), loadIcon("22/go-up.png"), "", defKeys[name], mainWindow));
5243 cbradney 379
        name="itemSendToScrapbook";
9857 cbradney 380
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
6410 fschmid 381
        name="itemSendToPattern";
9857 cbradney 382
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 383
        name="itemImageInfo";
9857 cbradney 384
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 385
        name="itemAttributes";
9857 cbradney 386
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 387
        name="itemImageIsVisible";
9857 cbradney 388
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 389
        name="itemUpdateImage";
9857 cbradney 390
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 391
        name="itemAdjustFrameToImage";
9857 cbradney 392
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 393
        name="itemExtendedImageProperties";
9857 cbradney 394
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 395
        name="itemPreviewLow";
9857 cbradney 396
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 2));
5243 cbradney 397
        name="itemPreviewNormal";
9857 cbradney 398
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 1));
5243 cbradney 399
        name="itemPreviewFull";
9857 cbradney 400
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0));
5243 cbradney 401
        name="itemPDFIsBookmark";
9857 cbradney 402
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 403
        (*scrActions)["itemPDFIsBookmark"]->setToggleAction(true);
5243 cbradney 404
        name="itemPDFIsAnnotation";
9857 cbradney 405
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 406
        (*scrActions)["itemPDFIsAnnotation"]->setToggleAction(true);
5243 cbradney 407
        name="itemPDFAnnotationProps";
9857 cbradney 408
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 409
        name="itemPDFFieldProps";
9857 cbradney 410
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
2246 subik 411
 
1993 cbradney 412
        (*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
413
        (*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
414
        (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
415
        (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
2246 subik 416
 
2026 cbradney 417
        (*scrActions)["itemImageIsVisible"]->setToggleAction(true);
2256 cbradney 418
        (*scrActions)["itemPreviewLow"]->setToggleAction(true);
419
        (*scrActions)["itemPreviewNormal"]->setToggleAction(true);
420
        (*scrActions)["itemPreviewFull"]->setToggleAction(true);
2246 subik 421
 
5243 cbradney 422
        name="itemShapeEdit";
9857 cbradney 423
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 424
        (*scrActions)["itemShapeEdit"]->setToggleAction(true);
5243 cbradney 425
        name="itemAttachTextToPath";
9857 cbradney 426
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 427
        name="itemDetachTextFromPath";
9857 cbradney 428
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 429
        name="itemCombinePolygons";
9857 cbradney 430
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 431
        name="itemSplitPolygons";
9857 cbradney 432
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 433
        name="itemConvertToBezierCurve";
9857 cbradney 434
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 435
        name="itemConvertToImageFrame";
9857 cbradney 436
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 437
        name="itemConvertToOutlines";
9857 cbradney 438
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 439
        name="itemConvertToPolygon";
9857 cbradney 440
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 441
        name="itemConvertToTextFrame";
9857 cbradney 442
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 443
 
5243 cbradney 444
        connect( (*scrActions)["itemDuplicate"], SIGNAL(activated()), mainWindow, SLOT(ObjektDup()) );
445
        connect( (*scrActions)["itemMulDuplicate"], SIGNAL(activated()), mainWindow, SLOT(ObjektDupM()) );
446
        connect( (*scrActions)["itemGroup"], SIGNAL(activated()), mainWindow, SLOT(GroupObj()) );
447
        connect( (*scrActions)["itemUngroup"], SIGNAL(activated()), mainWindow, SLOT(UnGroupObj()) );
448
        connect( (*scrActions)["itemPDFAnnotationProps"], SIGNAL(activated()), mainWindow, SLOT(ModifyAnnot()) );
449
        connect( (*scrActions)["itemPDFFieldProps"], SIGNAL(activated()), mainWindow, SLOT(ModifyAnnot()) );
450
        connect( (*scrActions)["itemSendToScrapbook"], SIGNAL(activated()), mainWindow, SLOT(PutScrap()) );
6410 fschmid 451
        connect( (*scrActions)["itemSendToPattern"], SIGNAL(activated()), mainWindow, SLOT(PutToPatterns()) );
5243 cbradney 452
        connect( (*scrActions)["itemAttributes"], SIGNAL(activated()), mainWindow, SLOT(objectAttributes()) );
453
        connect( (*scrActions)["itemShapeEdit"], SIGNAL(activated()), mainWindow, SLOT(ToggleFrameEdit()) );
454
        connect( (*scrActions)["itemImageInfo"], SIGNAL(activated()), mainWindow, SLOT(getImageInfo()) );
1993 cbradney 455
}
456
 
457
void ActionManager::initInsertMenuActions()
458
{
5243 cbradney 459
        QString name;
1993 cbradney 460
        //Insert Menu
6083 cbradney 461
        name="insertFrame";
9857 cbradney 462
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 463
        name="insertGlyph";
9857 cbradney 464
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
7087 subik 465
        (*scrActions)["insertGlyph"]->setToggleAction(true);
5243 cbradney 466
        name="insertSampleText";
9857 cbradney 467
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
7350 fschmid 468
        name="stickyTools";
9857 cbradney 469
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
7350 fschmid 470
        (*scrActions)["stickyTools"]->setToggleAction(true);
2246 subik 471
 
6083 cbradney 472
        connect( (*scrActions)["insertFrame"], SIGNAL(activated()), mainWindow, SLOT(slotInsertFrame()) );
5243 cbradney 473
        connect( (*scrActions)["insertGlyph"], SIGNAL(activated()), mainWindow, SLOT(slotCharSelect()) );
474
        connect( (*scrActions)["insertSampleText"], SIGNAL(activated()), mainWindow, SLOT(insertSampleText()) );
7350 fschmid 475
        connect( (*scrActions)["stickyTools"], SIGNAL(activated()), mainWindow, SLOT(ToggleStickyTools()) );
1993 cbradney 476
}
477
 
478
void ActionManager::initPageMenuActions()
479
{
5243 cbradney 480
        QString name;
1993 cbradney 481
        //Page menu
5243 cbradney 482
        name="pageInsert";
9857 cbradney 483
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 484
        name="pageImport";
9857 cbradney 485
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 486
        name="pageDelete";
9857 cbradney 487
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 488
        name="pageCopy";
9857 cbradney 489
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 490
        name="pageMove";
9857 cbradney 491
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 492
        name="pageApplyMasterPage";
9857 cbradney 493
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 494
        name="pageCopyToMasterPage";
9857 cbradney 495
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 496
        name="pageManageGuides";
9857 cbradney 497
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5087 subik 498
        (*scrActions)["pageManageGuides"]->setToggleAction(true);
5243 cbradney 499
        name="pageManageMargins";
9857 cbradney 500
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 501
 
5243 cbradney 502
        connect( (*scrActions)["pageInsert"], SIGNAL(activated()), mainWindow, SLOT(slotNewPageM()) );
503
        connect( (*scrActions)["pageImport"], SIGNAL(activated()), mainWindow, SLOT(slotPageImport()) );
504
        connect( (*scrActions)["pageDelete"], SIGNAL(activated()), mainWindow, SLOT(DeletePage()) );
505
        connect( (*scrActions)["pageCopy"], SIGNAL(activated()), mainWindow, SLOT(CopyPage()) );
506
        connect( (*scrActions)["pageMove"], SIGNAL(activated()), mainWindow, SLOT(MovePage()) );
507
        connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(activated()), mainWindow, SLOT(ApplyMasterPage()) );
508
        connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(activated()), mainWindow, SLOT(duplicateToMasterPage()) );
509
        connect( (*scrActions)["pageManageMargins"], SIGNAL(activated()), mainWindow, SLOT(changePageMargins()) );
1993 cbradney 510
}
511
 
512
void ActionManager::initViewMenuActions()
513
{
5243 cbradney 514
        QString name;
515
        name="viewFitInWindow";
9857 cbradney 516
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, -100.0));
7164 fschmid 517
        name="viewFitWidth";
9857 cbradney 518
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, -200.0));
5243 cbradney 519
        name="viewFit50";
9857 cbradney 520
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, 50.0));
5243 cbradney 521
        name="viewFit75";
9857 cbradney 522
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, 75.0));
5243 cbradney 523
        name="viewFit100";
9857 cbradney 524
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, loadIcon("16/zoom-original.png"), loadIcon("22/zoom-original.png"), "", defKeys[name], mainWindow, 0, 100.0));
5243 cbradney 525
        name="viewFit200";
9857 cbradney 526
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, 200.0));
9744 jghali 527
        name="viewFit400";
9857 cbradney 528
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, 400.0));
7587 cbradney 529
        name="viewFitPreview";
9857 cbradney 530
        scrActions->insert(name, new ScrAction(ScrAction::DataDouble, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0, 20.0));
5243 cbradney 531
        name="viewShowMargins";
9857 cbradney 532
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
7051 fschmid 533
        name="viewShowBleeds";
9857 cbradney 534
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 535
        name="viewShowFrames";
9857 cbradney 536
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5584 fschmid 537
        name="viewShowLayerMarkers";
9857 cbradney 538
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 539
        name="viewShowImages";
9857 cbradney 540
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 541
        name="viewShowGrid";
9857 cbradney 542
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 543
        name="viewShowGuides";
9857 cbradney 544
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5384 cbradney 545
        name="viewShowColumnBorders";
9857 cbradney 546
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 547
        name="viewShowBaseline";
9857 cbradney 548
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 549
        name="viewShowTextChain";
9857 cbradney 550
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 551
        name="viewShowTextControls";
9857 cbradney 552
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 553
        name="viewShowRulers";
9857 cbradney 554
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 555
        name="viewRulerMode";
9857 cbradney 556
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 557
        name="viewSnapToGrid";
9857 cbradney 558
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 559
        name="viewSnapToGuides";
9857 cbradney 560
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
561
//      scrActions->insert("viewNewView", new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 562
 
7587 cbradney 563
        (*scrActions)["viewFitPreview"]->setToggleAction(true);
1993 cbradney 564
        (*scrActions)["viewShowMargins"]->setToggleAction(true);
7051 fschmid 565
        (*scrActions)["viewShowBleeds"]->setToggleAction(true);
1993 cbradney 566
        (*scrActions)["viewShowFrames"]->setToggleAction(true);
5584 fschmid 567
        (*scrActions)["viewShowLayerMarkers"]->setToggleAction(true);
1993 cbradney 568
        (*scrActions)["viewShowImages"]->setToggleAction(true);
569
        (*scrActions)["viewShowGrid"]->setToggleAction(true);
570
        (*scrActions)["viewShowGuides"]->setToggleAction(true);
5384 cbradney 571
        (*scrActions)["viewShowColumnBorders"]->setToggleAction(true);
1993 cbradney 572
        (*scrActions)["viewShowBaseline"]->setToggleAction(true);
573
        (*scrActions)["viewShowTextChain"]->setToggleAction(true);
2353 fschmid 574
        (*scrActions)["viewShowTextControls"]->setToggleAction(true);
4651 cbradney 575
        (*scrActions)["viewShowRulers"]->setToggleAction(true);
2863 fschmid 576
        (*scrActions)["viewRulerMode"]->setToggleAction(true);
1993 cbradney 577
        (*scrActions)["viewSnapToGrid"]->setToggleAction(true);
578
        (*scrActions)["viewSnapToGuides"]->setToggleAction(true);
579
 
7587 cbradney 580
        (*scrActions)["viewFitPreview"]->setOn(false);
1993 cbradney 581
        (*scrActions)["viewShowMargins"]->setOn(true);
7051 fschmid 582
        (*scrActions)["viewShowBleeds"]->setOn(true);
1993 cbradney 583
        (*scrActions)["viewShowFrames"]->setOn(true);
5584 fschmid 584
        (*scrActions)["viewShowLayerMarkers"]->setOn(false);
1993 cbradney 585
        (*scrActions)["viewShowImages"]->setOn(true);
586
        (*scrActions)["viewShowGuides"]->setOn(true);
5384 cbradney 587
        (*scrActions)["viewShowColumnBorders"]->setOn(false);
4651 cbradney 588
        (*scrActions)["viewShowRulers"]->setOn(true);
2863 fschmid 589
        (*scrActions)["viewRulerMode"]->setOn(true);
1993 cbradney 590
 
5243 cbradney 591
        connect( (*scrActions)["viewFitInWindow"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
7164 fschmid 592
        connect( (*scrActions)["viewFitWidth"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
5243 cbradney 593
        connect( (*scrActions)["viewFit50"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
594
        connect( (*scrActions)["viewFit75"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
595
        connect( (*scrActions)["viewFit100"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
596
        connect( (*scrActions)["viewFit200"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
9744 jghali 597
        connect( (*scrActions)["viewFit400"], SIGNAL(activatedData(double)), mainWindow, SLOT(slotZoom(double)) );
5243 cbradney 598
        connect( (*scrActions)["viewShowMargins"], SIGNAL(activated()), mainWindow, SLOT(ToggleMarks()) );
7051 fschmid 599
        connect( (*scrActions)["viewShowBleeds"], SIGNAL(activated()), mainWindow, SLOT(ToggleBleeds()) );
5243 cbradney 600
        connect( (*scrActions)["viewShowFrames"], SIGNAL(activated()), mainWindow, SLOT(ToggleFrames()) );
5584 fschmid 601
        connect( (*scrActions)["viewShowLayerMarkers"], SIGNAL(activated()), mainWindow, SLOT(ToggleLayerMarkers()) );
5243 cbradney 602
        connect( (*scrActions)["viewShowImages"], SIGNAL(activated()), mainWindow, SLOT(TogglePics()) );
603
        connect( (*scrActions)["viewShowGrid"], SIGNAL(activated()), mainWindow, SLOT(ToggleRaster()) );
604
        connect( (*scrActions)["viewShowGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleGuides()) );
5384 cbradney 605
        connect( (*scrActions)["viewShowColumnBorders"], SIGNAL(activated()), mainWindow, SLOT(ToggleColumnBorders()) );
5243 cbradney 606
        connect( (*scrActions)["viewShowBaseline"], SIGNAL(activated()), mainWindow, SLOT(ToggleBase()) );
607
        connect( (*scrActions)["viewShowTextChain"], SIGNAL(activated()), mainWindow, SLOT(ToggleTextLinks()) );
608
        connect( (*scrActions)["viewShowTextControls"], SIGNAL(activated()), mainWindow, SLOT(ToggleTextControls()) );
609
        connect( (*scrActions)["viewShowRulers"], SIGNAL(activated()), mainWindow, SLOT(ToggleRulers()) );
610
        connect( (*scrActions)["viewRulerMode"], SIGNAL(activated()), mainWindow, SLOT(ToggleRulerMode()) );
611
        connect( (*scrActions)["viewSnapToGrid"], SIGNAL(activated()), mainWindow, SLOT(ToggleURaster()) );
612
        connect( (*scrActions)["viewSnapToGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleUGuides()) );
613
//      connect( (*scrActions)["viewNewView"], SIGNAL(activated()), mainWindow, SLOT(newView()) );
1993 cbradney 614
 
615
}
616
 
617
void ActionManager::initToolsMenuActions()
618
{
5243 cbradney 619
        QString name;
1993 cbradney 620
        //Tool menu
5243 cbradney 621
        name="toolsProperties";
9857 cbradney 622
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 623
        name="toolsOutline";
9857 cbradney 624
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 625
        name="toolsScrapbook";
9857 cbradney 626
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 627
        name="toolsLayers";
9857 cbradney 628
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 629
        name="toolsPages";
9857 cbradney 630
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 631
        name="toolsBookmarks";
9857 cbradney 632
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 633
        name="toolsMeasurements";
9857 cbradney 634
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/measure.png"), loadIcon("22/measure.png"), "", defKeys[name], mainWindow, modeMeasurementTool));
5243 cbradney 635
        name="toolsActionHistory";
9857 cbradney 636
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 637
        name="toolsPreflightVerifier";
9857 cbradney 638
        scrActions->insert(name, new ScrAction(loadIcon("16/preflight-verifier.png"), loadIcon("22/preflight-verifier.png"),"", defKeys[name], mainWindow));
5243 cbradney 639
        name="toolsAlignDistribute";
9857 cbradney 640
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 641
        name="toolsToolbarTools";
9857 cbradney 642
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 643
        name="toolsToolbarPDF";
9857 cbradney 644
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
2246 subik 645
 
1993 cbradney 646
        //toolbar only items
5243 cbradney 647
        name="toolsSelect";
9857 cbradney 648
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/pointer.png"), loadIcon("22/pointer.png"), "", defKeys[name], mainWindow, modeNormal));
5243 cbradney 649
        name="toolsInsertTextFrame";
9857 cbradney 650
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/insert-text-frame.png"), loadIcon("22/insert-text-frame.png"), "", defKeys[name], mainWindow, modeDrawText));
5243 cbradney 651
        name="toolsInsertImageFrame";
9857 cbradney 652
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/insert-image.png"), loadIcon("22/insert-image.png"), "", defKeys[name], mainWindow, modeDrawPicture));
5243 cbradney 653
        name="toolsInsertTableFrame";
9857 cbradney 654
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/insert-table.png"), loadIcon("22/insert-table.png"), "", defKeys[name], mainWindow, modeDrawTable));
5243 cbradney 655
        name="toolsInsertShape";
9857 cbradney 656
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, modeDrawShapes));
5243 cbradney 657
        name="toolsInsertPolygon";
9857 cbradney 658
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-polygon.png"), loadIcon("22/draw-polygon.png"), "", defKeys[name], mainWindow, modeDrawRegularPolygon));
5243 cbradney 659
        name="toolsInsertLine";
9857 cbradney 660
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("Stift16.xpm"), loadIcon("Stift.xpm"), "", defKeys[name], mainWindow, modeDrawLine));
5243 cbradney 661
        name="toolsInsertBezier";
9857 cbradney 662
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-path.png"), loadIcon("22/draw-path.png"), "", defKeys[name], mainWindow, modeDrawBezierLine));
5243 cbradney 663
        name="toolsInsertFreehandLine";
9857 cbradney 664
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-freehand.png"), loadIcon("22/draw-freehand.png"), "", defKeys[name], mainWindow, modeDrawFreehandLine));
5243 cbradney 665
        name="toolsRotate";
9857 cbradney 666
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/transform-rotate.png"), loadIcon("22/transform-rotate.png"), "", defKeys[name], mainWindow, modeRotation));
5243 cbradney 667
        name="toolsZoom";
9857 cbradney 668
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/zoom.png"), loadIcon("22/zoom.png"), "", defKeys[name], mainWindow, modeMagnifier));
5243 cbradney 669
        name="toolsZoomIn";
9857 cbradney 670
        scrActions->insert(name, new ScrAction(loadIcon("16/zoom-in.png"), loadIcon("22/zoom-in.png"), "", defKeys[name], mainWindow));
5243 cbradney 671
        name="toolsZoomOut";
9857 cbradney 672
        scrActions->insert(name, new ScrAction(loadIcon("16/zoom-out.png"), loadIcon("22/zoom-out.png"), "", defKeys[name], mainWindow));
5243 cbradney 673
        name="toolsEditContents";
9857 cbradney 674
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("Editm16.png"), loadIcon("Editm.xpm"), "", defKeys[name], mainWindow, modeEdit));
5243 cbradney 675
        name="toolsEditWithStoryEditor";
9857 cbradney 676
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/story-editor.png"), loadIcon("22/story-editor.png"), "", defKeys[name], mainWindow, modeStoryEditor));
5243 cbradney 677
        name="toolsLinkTextFrame";
9857 cbradney 678
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/text-frame-link.png"), loadIcon("22/text-frame-link.png"), "", defKeys[name], mainWindow, modeLinkFrames));
5243 cbradney 679
        name="toolsUnlinkTextFrame";
9857 cbradney 680
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/text-frame-unlink.png"), loadIcon("22/text-frame-unlink.png"), "", defKeys[name], mainWindow, modeUnlinkFrames));
5243 cbradney 681
        name="toolsEyeDropper";
9857 cbradney 682
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/color-picker.png"), loadIcon("22/color-picker.png"), "", defKeys[name], mainWindow, modeEyeDropper));
5243 cbradney 683
        name="toolsCopyProperties";
9857 cbradney 684
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("wizard16.png"), loadIcon("wizard.png"), "", defKeys[name], mainWindow, modeCopyProperties));
7087 subik 685
 
5277 cbradney 686
        //PDF toolbar
687
        name="toolsPDFPushButton";
10078 cbradney 688
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/insert-button.png"), loadIcon("22/insert-button.png"), "", defKeys[name], mainWindow, modeInsertPDFButton));
5277 cbradney 689
        name="toolsPDFTextField";
10078 cbradney 690
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/text-field.png"), loadIcon("22/text-field.png"), "", defKeys[name], mainWindow, modeInsertPDFTextfield));
5277 cbradney 691
        name="toolsPDFCheckBox";
10078 cbradney 692
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/checkbox.png"), loadIcon("22/checkbox.png"), "", defKeys[name], mainWindow, modeInsertPDFCheckbox));
5277 cbradney 693
        name="toolsPDFComboBox";
10078 cbradney 694
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/combobox.png"), loadIcon("22/combobox.png"), "", defKeys[name], mainWindow, modeInsertPDFCombobox));
5277 cbradney 695
        name="toolsPDFListBox";
10078 cbradney 696
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/list-box.png"), loadIcon("22/list-box.png"), "", defKeys[name], mainWindow, modeInsertPDFListbox));
5277 cbradney 697
        name="toolsPDFAnnotText";
10078 cbradney 698
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/pdf-annotations.png"), loadIcon("22/pdf-annotations.png"), "", defKeys[name], mainWindow, modeInsertPDFTextAnnotation));
5277 cbradney 699
        name="toolsPDFAnnotLink";
10078 cbradney 700
        scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("goto16.png"), loadIcon("goto.png"), "", defKeys[name], mainWindow, modeInsertPDFLinkAnnotation));
2246 subik 701
 
1993 cbradney 702
        (*scrActions)["toolsProperties"]->setToggleAction(true);
703
        (*scrActions)["toolsOutline"]->setToggleAction(true);
704
        (*scrActions)["toolsScrapbook"]->setToggleAction(true);
705
        (*scrActions)["toolsLayers"]->setToggleAction(true);
706
        (*scrActions)["toolsPages"]->setToggleAction(true);
707
        (*scrActions)["toolsBookmarks"]->setToggleAction(true);
708
        (*scrActions)["toolsMeasurements"]->setToggleAction(true);
709
        (*scrActions)["toolsActionHistory"]->setToggleAction(true);
710
        (*scrActions)["toolsPreflightVerifier"]->setToggleAction(true);
2355 cbradney 711
        (*scrActions)["toolsAlignDistribute"]->setToggleAction(true);
1993 cbradney 712
        (*scrActions)["toolsToolbarTools"]->setToggleAction(true);
713
        (*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
2246 subik 714
 
1993 cbradney 715
        (*scrActions)["toolsSelect"]->setToggleAction(true);
716
        (*scrActions)["toolsInsertTextFrame"]->setToggleAction(true);
717
        (*scrActions)["toolsInsertImageFrame"]->setToggleAction(true);
718
        (*scrActions)["toolsInsertTableFrame"]->setToggleAction(true);
719
        (*scrActions)["toolsInsertShape"]->setToggleAction(true);
720
        (*scrActions)["toolsInsertPolygon"]->setToggleAction(true);
721
        (*scrActions)["toolsInsertLine"]->setToggleAction(true);
722
        (*scrActions)["toolsInsertBezier"]->setToggleAction(true);
723
        (*scrActions)["toolsInsertFreehandLine"]->setToggleAction(true);
724
        (*scrActions)["toolsRotate"]->setToggleAction(true);
725
        (*scrActions)["toolsZoom"]->setToggleAction(true);
726
        (*scrActions)["toolsEditContents"]->setToggleAction(true);
727
        (*scrActions)["toolsEditWithStoryEditor"]->setToggleAction(true);
728
        (*scrActions)["toolsLinkTextFrame"]->setToggleAction(true);
729
        (*scrActions)["toolsUnlinkTextFrame"]->setToggleAction(true);
730
        (*scrActions)["toolsEyeDropper"]->setToggleAction(true);
731
        (*scrActions)["toolsCopyProperties"]->setToggleAction(true);
7087 subik 732
 
5277 cbradney 733
        (*scrActions)["toolsPDFPushButton"]->setToggleAction(true);
734
        (*scrActions)["toolsPDFTextField"]->setToggleAction(true);
735
        (*scrActions)["toolsPDFCheckBox"]->setToggleAction(true);
736
        (*scrActions)["toolsPDFComboBox"]->setToggleAction(true);
737
        (*scrActions)["toolsPDFListBox"]->setToggleAction(true);
738
        (*scrActions)["toolsPDFAnnotText"]->setToggleAction(true);
739
        (*scrActions)["toolsPDFAnnotLink"]->setToggleAction(true);
2246 subik 740
 
1993 cbradney 741
        *modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame" << "toolsInsertTableFrame";
742
        *modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertLine" << "toolsInsertBezier";
743
        *modeActionNames << "toolsInsertFreehandLine" << "toolsRotate" << "toolsZoom" << "toolsEditContents";
744
        *modeActionNames << "toolsEditWithStoryEditor" << "toolsLinkTextFrame" << "toolsUnlinkTextFrame";
745
        *modeActionNames << "toolsEyeDropper" << "toolsCopyProperties";
5277 cbradney 746
        *modeActionNames << "toolsPDFPushButton" << "toolsPDFTextField" << "toolsPDFCheckBox" << "toolsPDFComboBox" << "toolsPDFListBox" << "toolsPDFAnnotText" << "toolsPDFAnnotLink";
1993 cbradney 747
 
5357 cbradney 748
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
749
                (*scrActions)[*it]->setEnabled(false);
750
 
751
 
2104 cbradney 752
        *nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
2246 subik 753
 
5243 cbradney 754
        connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoPalette(bool)) );
2246 subik 755
 
1993 cbradney 756
        connectModeActions();
757
}
758
 
759
void ActionManager::initExtrasMenuActions()
760
{
5243 cbradney 761
        QString name;
762
        name="extrasManagePictures";
9857 cbradney 763
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 764
        name="extrasHyphenateText";
9857 cbradney 765
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 766
        name="extrasDeHyphenateText";
9857 cbradney 767
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 768
        name="extrasGenerateTableOfContents";
9857 cbradney 769
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
1993 cbradney 770
 
5243 cbradney 771
        connect( (*scrActions)["extrasManagePictures"], SIGNAL(activated()), mainWindow, SLOT(StatusPic()) );
772
        connect( (*scrActions)["extrasGenerateTableOfContents"], SIGNAL(activated()), mainWindow, SLOT(generateTableOfContents()) );
1993 cbradney 773
}
774
 
775
 
776
void ActionManager::initWindowsMenuActions()
777
{
5243 cbradney 778
        QString name;
779
        name="windowsCascade";
9857 cbradney 780
        scrActions->insert(name, new ScrAction( "", defKeys[name], mainWindow));
5243 cbradney 781
        name="windowsTile";
9857 cbradney 782
        scrActions->insert(name, new ScrAction( "", defKeys[name], mainWindow));
1993 cbradney 783
}
784
 
785
void ActionManager::initScriptMenuActions()
786
{
787
}
788
 
789
void ActionManager::initHelpMenuActions()
790
{
5243 cbradney 791
        QString name;
792
        name="helpAboutScribus";
9857 cbradney 793
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 794
        name="helpAboutPlugins";
9857 cbradney 795
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 796
        name="helpAboutQt";
9857 cbradney 797
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 798
        name="helpTooltips";
9857 cbradney 799
        scrActions->insert(name, new ScrAction("", defKeys[name], mainWindow));
5243 cbradney 800
        name="helpManual";
9857 cbradney 801
        scrActions->insert(name, new ScrAction(loadIcon("16/help-browser.png"), QPixmap(), "", defKeys[name], mainWindow));
10051 cbradney 802
        name="helpManual2";
803
        scrActions->insert(name, new ScrAction(loadIcon("16/help-browser.png"), QPixmap(), "", defKeys[name], mainWindow));
1993 cbradney 804
 
805
        (*scrActions)["helpTooltips"]->setToggleAction(true);
806
        (*scrActions)["helpTooltips"]->setOn(true);
807
 
5243 cbradney 808
        connect( (*scrActions)["helpAboutScribus"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAbout()) );
809
        connect( (*scrActions)["helpAboutPlugins"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAboutPlugins()) );
810
        connect( (*scrActions)["helpAboutQt"], SIGNAL(activated()), mainWindow, SLOT(slotHelpAboutQt()) );
811
        connect( (*scrActions)["helpTooltips"], SIGNAL(activated()), mainWindow, SLOT(ToggleTips()) );
812
        connect( (*scrActions)["helpManual"], SIGNAL(activated()), mainWindow, SLOT(slotOnlineHelp()) );
10051 cbradney 813
        connect( (*scrActions)["helpManual2"], SIGNAL(activated()), mainWindow, SLOT(slotOnlineHelp2()) );
1993 cbradney 814
}
815
 
8501 cbradney 816
void ActionManager::initUnicodeActions(QMap<QString, QPointer<ScrAction> > *actionMap, QWidget *actionParent, QStringList *actionNamesList)
1993 cbradney 817
{
5243 cbradney 818
        QString name;
1993 cbradney 819
        //typography
5243 cbradney 820
        name="unicodeSmartHyphen";
9857 cbradney 821
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::SHYPHEN.unicode(), 0.0, name));
5243 cbradney 822
        name="unicodeNonBreakingHyphen";
9857 cbradney 823
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::NBHYPHEN.unicode(), 0.0, name));
5243 cbradney 824
        name="unicodeNonBreakingSpace";
9857 cbradney 825
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::NBSPACE.unicode(), 0.0, name));
5243 cbradney 826
        name="unicodePageNumber";
9857 cbradney 827
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::PAGENUMBER.unicode(), 0.0, name));
4720 cbradney 828
        //Spaces
5243 cbradney 829
        name="unicodeSpaceEN";
9857 cbradney 830
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2002, 0.0, name));
5243 cbradney 831
        name="unicodeSpaceEM";
9857 cbradney 832
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2003, 0.0, name));
5243 cbradney 833
        name="unicodeSpaceThin";
9857 cbradney 834
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2009, 0.0, name));
5243 cbradney 835
        name="unicodeSpaceThick";
9857 cbradney 836
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2004, 0.0, name));
5243 cbradney 837
        name="unicodeSpaceMid";
9857 cbradney 838
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2005, 0.0, name));
5243 cbradney 839
        name="unicodeSpaceHair";
9857 cbradney 840
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x200A, 0.0, name));
4564 cbradney 841
        //Breaks
5243 cbradney 842
        name="unicodeNewLine";
9857 cbradney 843
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::LINEBREAK.unicode(), 0.0, name));
5243 cbradney 844
        name="unicodeFrameBreak";
9857 cbradney 845
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::FRAMEBREAK.unicode(), 0.0, name));
5243 cbradney 846
        name="unicodeColumnBreak";
9857 cbradney 847
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::COLBREAK.unicode(), 0.0, name));
7038 avox 848
        name="unicodeZerowidthSpace";
9857 cbradney 849
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::ZWSPACE.unicode(), 0.0, name));
7038 avox 850
        name="unicodeZerowidthNonBreakingSpace";
9857 cbradney 851
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, SpecialChars::ZWNBSPACE.unicode(), 0.0, name));
4564 cbradney 852
        //Special
5243 cbradney 853
        name="unicodeCopyRight";
9857 cbradney 854
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x0A9, 0.0, name));
5243 cbradney 855
        name="unicodeRegdTM";
9857 cbradney 856
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x00AE, 0.0, name));
5243 cbradney 857
        name="unicodeTM";
9857 cbradney 858
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2122, 0.0, name));
5243 cbradney 859
        name="unicodeBullet";
9857 cbradney 860
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2022, 0.0, name));
5243 cbradney 861
        name="unicodeMidpoint";
9857 cbradney 862
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x00B7, 0.0, name));
5243 cbradney 863
        name="unicodeSolidus";
9857 cbradney 864
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2044, 0.0, name));
4564 cbradney 865
        //Dashes
5243 cbradney 866
        name="unicodeDashEm";
9857 cbradney 867
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2014, 0.0, name));
5243 cbradney 868
        name="unicodeDashEn";
9857 cbradney 869
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2013, 0.0, name));
5243 cbradney 870
        name="unicodeDashFigure";
9857 cbradney 871
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2012, 0.0, name));
5243 cbradney 872
        name="unicodeDashQuotation";
9857 cbradney 873
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2015, 0.0, name));
4564 cbradney 874
        //Quotes
5243 cbradney 875
        name="unicodeQuoteApostrophe";
9857 cbradney 876
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x0027, 0.0, name));
5243 cbradney 877
        name="unicodeQuoteStraight";
9857 cbradney 878
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x0022, 0.0, name));
5243 cbradney 879
        name="unicodeQuoteSingleLeft";
9857 cbradney 880
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2018, 0.0, name));
5243 cbradney 881
        name="unicodeQuoteSingleRight";
9857 cbradney 882
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2019, 0.0, name));
5243 cbradney 883
        name="unicodeQuoteDoubleLeft";
9857 cbradney 884
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x201C, 0.0, name));
5243 cbradney 885
        name="unicodeQuoteDoubleRight";
9857 cbradney 886
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x201D, 0.0, name));
5243 cbradney 887
        name="unicodeQuoteSingleReversed";
9857 cbradney 888
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x201B, 0.0, name));
5243 cbradney 889
        name="unicodeQuoteDoubleReversed";
9857 cbradney 890
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x201F, 0.0, name));
5243 cbradney 891
        name="unicodeQuoteSingleLeftGuillemet";
9857 cbradney 892
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x2039, 0.0, name));
5243 cbradney 893
        name="unicodeQuoteSingleRightGuillemet";
9857 cbradney 894
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x203A, 0.0, name));
5243 cbradney 895
        name="unicodeQuoteDoubleLeftGuillemet";
9857 cbradney 896
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x00AB, 0.0, name));
5243 cbradney 897
        name="unicodeQuoteDoubleRightGuillemet";
9857 cbradney 898
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x00BB, 0.0, name));
5243 cbradney 899
        name="unicodeQuoteLowSingleComma";
9857 cbradney 900
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x201A, 0.0, name));
5243 cbradney 901
        name="unicodeQuoteLowDoubleComma";
9857 cbradney 902
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x201E, 0.0, name));
5243 cbradney 903
        name="unicodeQuoteCJKSingleLeft";
9857 cbradney 904
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x300C, 0.0, name));
5243 cbradney 905
        name="unicodeQuoteCJKSingleRight";
9857 cbradney 906
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x300D, 0.0, name));
5243 cbradney 907
        name="unicodeQuoteCJKDoubleLeft";
9857 cbradney 908
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x300E, 0.0, name));
5243 cbradney 909
        name="unicodeQuoteCJKDoubleRight";
9857 cbradney 910
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0x300F, 0.0, name));
4564 cbradney 911
        //Ligatures
5243 cbradney 912
        name="unicodeLigature_ff";
9857 cbradney 913
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB00, 0.0, name));
5243 cbradney 914
        name="unicodeLigature_fi";
9857 cbradney 915
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB01, 0.0, name));
5243 cbradney 916
        name="unicodeLigature_fl";
9857 cbradney 917
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB02, 0.0, name));
5243 cbradney 918
        name="unicodeLigature_ffi";
9857 cbradney 919
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB03, 0.0, name));
5243 cbradney 920
        name="unicodeLigature_ffl";
9857 cbradney 921
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB04, 0.0, name));
5243 cbradney 922
        name="unicodeLigature_ft";
9857 cbradney 923
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB05, 0.0, name));
5243 cbradney 924
        name="unicodeLigature_st";
9857 cbradney 925
        actionMap->insert(name, new ScrAction(ScrAction::UnicodeChar, QPixmap(), QPixmap(), "", defKeys[name], actionParent, 0xFB06, 0.0, name));
7087 subik 926
 
2391 cbradney 927
        //Spaces and special characters
7087 subik 928
 
4564 cbradney 929
        *actionNamesList << "unicodeSmartHyphen" << "unicodeNonBreakingHyphen" << "unicodeNonBreakingSpace" << "unicodePageNumber";
4720 cbradney 930
        *actionNamesList << "unicodeSpaceEN" << "unicodeSpaceEM" << "unicodeSpaceThin" << "unicodeSpaceThick" << "unicodeSpaceMid" << "unicodeSpaceHair";
2391 cbradney 931
        //Breaks
7038 avox 932
        *actionNamesList << "unicodeNewLine" << "unicodeFrameBreak" << "unicodeColumnBreak" << "unicodeZerowidthSpace";
2391 cbradney 933
        //Copyrights and TMs
4564 cbradney 934
        *actionNamesList << "unicodeCopyRight" << "unicodeRegdTM" << "unicodeTM";
4720 cbradney 935
        //Slashes
936
        *actionNamesList << "unicodeSolidus";
2391 cbradney 937
        //Bullets
4720 cbradney 938
        *actionNamesList << "unicodeBullet" << "unicodeMidpoint";
2391 cbradney 939
        //Dashes
4564 cbradney 940
        *actionNamesList << "unicodeDashEm" << "unicodeDashEn" << "unicodeDashFigure" << "unicodeDashQuotation";
2391 cbradney 941
        //Straight quotes
4564 cbradney 942
        *actionNamesList << "unicodeQuoteApostrophe" << "unicodeQuoteStraight";
2391 cbradney 943
        //Double quotes
4564 cbradney 944
        *actionNamesList << "unicodeQuoteDoubleLeft" << "unicodeQuoteDoubleRight" << "unicodeQuoteSingleLeft" << "unicodeQuoteSingleRight";
5261 cbradney 945
        //Alternative single quotes
4564 cbradney 946
        *actionNamesList << "unicodeQuoteSingleReversed" << "unicodeQuoteDoubleReversed";
2391 cbradney 947
        //French quotes
4564 cbradney 948
        *actionNamesList << "unicodeQuoteSingleLeftGuillemet" << "unicodeQuoteSingleRightGuillemet" << "unicodeQuoteDoubleLeftGuillemet" << "unicodeQuoteDoubleRightGuillemet";
2391 cbradney 949
        //German quotes
4564 cbradney 950
        *actionNamesList << "unicodeQuoteLowSingleComma" << "unicodeQuoteLowDoubleComma";
2391 cbradney 951
        //CJK Quotes
4564 cbradney 952
        *actionNamesList << "unicodeQuoteCJKSingleLeft" << "unicodeQuoteCJKSingleRight" << "unicodeQuoteCJKDoubleLeft" << "unicodeQuoteCJKDoubleRight";
953
        //Ligatures
954
        *actionNamesList << "unicodeLigature_ff" << "unicodeLigature_fi" << "unicodeLigature_fl" << "unicodeLigature_ffi" << "unicodeLigature_ffl" << "unicodeLigature_ft" << "unicodeLigature_st";
4557 cbradney 955
        for ( QStringList::Iterator it = actionNamesList->begin(); it != actionNamesList->end(); ++it )
8080 cbradney 956
                connect( (*actionMap)[*it], SIGNAL(activatedUnicodeShortcut(const QString&, int)), actionParent, SLOT(specialActionKeyEvent(const QString&, int)) );
4557 cbradney 957
}
1993 cbradney 958
 
4557 cbradney 959
void ActionManager::initSpecialActions()
960
{
5243 cbradney 961
        QString name;
1993 cbradney 962
        //GUI
5261 cbradney 963
        name="specialToggleAllPalettes";
9857 cbradney 964
        scrActions->insert(name, new ScrAction(ScrAction::DataQString, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0,0.0,name));
5261 cbradney 965
        name="specialToggleAllGuides";
9857 cbradney 966
        scrActions->insert(name, new ScrAction(ScrAction::DataQString, QPixmap(), QPixmap(), "", defKeys[name], mainWindow, 0,0.0,name));
1993 cbradney 967
 
5261 cbradney 968
        connect( (*scrActions)["specialToggleAllPalettes"], SIGNAL(activated()), mainWindow, SLOT(ToggleAllPalettes()) );
969
        connect( (*scrActions)["specialToggleAllGuides"], SIGNAL(activated()), mainWindow, SLOT(ToggleAllGuides()) );
1993 cbradney 970
}
971
 
972
void ActionManager::disconnectModeActions()
973
{
974
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
5243 cbradney 975
                disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
1993 cbradney 976
}
2246 subik 977
 
1993 cbradney 978
void ActionManager::connectModeActions()
979
{
980
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
5243 cbradney 981
                connect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
1993 cbradney 982
}
983
 
4688 cbradney 984
void ActionManager::disconnectNewDocActions()
985
{
7739 cbradney 986
        disconnect( (*scrActions)["itemAdjustFrameToImage"], 0, 0, 0 );
4688 cbradney 987
        disconnect( (*scrActions)["itemLock"], 0, 0, 0);
988
        disconnect( (*scrActions)["itemLockSize"], 0, 0, 0);
4698 cbradney 989
        disconnect( (*scrActions)["itemPrintingEnabled"], 0, 0, 0);
4699 cbradney 990
        disconnect( (*scrActions)["itemFlipH"], 0, 0, 0);
991
        disconnect( (*scrActions)["itemFlipV"], 0, 0, 0);
7739 cbradney 992
        disconnect( (*scrActions)["itemCombinePolygons"], 0, 0, 0);
993
        disconnect( (*scrActions)["itemSplitPolygons"], 0, 0, 0);
4688 cbradney 994
        disconnect( (*scrActions)["itemUpdateImage"], 0, 0, 0 );
4713 cbradney 995
        disconnect( (*scrActions)["itemDelete"], 0, 0, 0);
996
        disconnect( (*scrActions)["extrasHyphenateText"], 0, 0, 0 );
997
        disconnect( (*scrActions)["extrasDeHyphenateText"], 0, 0, 0 );
998
 
4688 cbradney 999
}
1000
 
1001
void ActionManager::connectNewDocActions(ScribusDoc *currDoc)
1002
{
1003
        if (currDoc==NULL)
1004
                return;
1005
        connect( (*scrActions)["itemLock"], SIGNAL(activated()), currDoc, SLOT(itemSelection_ToggleLock()) );
1006
        connect( (*scrActions)["itemLockSize"], SIGNAL(activated()), currDoc, SLOT(itemSelection_ToggleSizeLock()));
4698 cbradney 1007
        connect( (*scrActions)["itemPrintingEnabled"], SIGNAL(activated()), currDoc, SLOT(itemSelection_TogglePrintEnabled()));
4699 cbradney 1008
        connect( (*scrActions)["itemFlipH"], SIGNAL(activated()), currDoc, SLOT(itemSelection_FlipH()));
1009
        connect( (*scrActions)["itemFlipV"], SIGNAL(activated()), currDoc, SLOT(itemSelection_FlipV()));
7739 cbradney 1010
        connect( (*scrActions)["itemCombinePolygons"], SIGNAL(activated()), currDoc, SLOT(itemSelection_UniteItems()) );
1011
        connect( (*scrActions)["itemSplitPolygons"], SIGNAL(activated()), currDoc, SLOT(itemSelection_SplitItems()) );
4688 cbradney 1012
        connect( (*scrActions)["itemUpdateImage"], SIGNAL(activated()), currDoc, SLOT(updatePic()) );
4713 cbradney 1013
        connect( (*scrActions)["extrasHyphenateText"], SIGNAL(activated()), currDoc, SLOT(itemSelection_DoHyphenate()) );
1014
        connect( (*scrActions)["extrasDeHyphenateText"], SIGNAL(activated()), currDoc, SLOT(itemSelection_DoDeHyphenate()) );
1015
        connect( (*scrActions)["itemDelete"], SIGNAL(activated()), currDoc, SLOT(itemSelection_DeleteItem()) );
7739 cbradney 1016
        connect( (*scrActions)["itemAdjustFrameToImage"], SIGNAL(activated()), currDoc, SLOT(itemSelection_adjustFrametoImageSize()) );
4688 cbradney 1017
}
1018
 
2026 cbradney 1019
void ActionManager::disconnectNewViewActions()
1020
{
7587 cbradney 1021
        disconnect( (*scrActions)["viewFitPreview"], 0, 0, 0);
2026 cbradney 1022
        disconnect( (*scrActions)["toolsZoomIn"], 0, 0, 0);
1023
        disconnect( (*scrActions)["toolsZoomOut"], 0, 0, 0);
2104 cbradney 1024
        disconnect( (*scrActions)["itemLowerToBottom"], 0, 0, 0);
2026 cbradney 1025
        disconnect( (*scrActions)["itemImageIsVisible"], 0, 0, 0);
2256 cbradney 1026
        disconnect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)), 0, 0 );
1027
        disconnect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)), 0,0 );
1028
        disconnect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)), 0, 0 );
2026 cbradney 1029
        disconnect( (*scrActions)["itemRaise"], 0, 0, 0);
1030
        disconnect( (*scrActions)["itemLower"], 0, 0, 0);
1031
        disconnect( (*scrActions)["itemConvertToBezierCurve"], 0, 0, 0);
1032
        disconnect( (*scrActions)["itemConvertToImageFrame"], 0, 0, 0);
1033
        disconnect( (*scrActions)["itemConvertToOutlines"], 0, 0, 0);
1034
        disconnect( (*scrActions)["itemConvertToPolygon"], 0, 0, 0);
1035
        disconnect( (*scrActions)["itemConvertToTextFrame"], 0, 0, 0);
1036
        disconnect( (*scrActions)["itemAttachTextToPath"], 0, 0, 0);
1037
        disconnect( (*scrActions)["itemDetachTextFromPath"], 0, 0, 0);
2260 cbradney 1038
        disconnect( (*scrActions)["itemExtendedImageProperties"], 0, 0, 0 );
2026 cbradney 1039
}
2246 subik 1040
 
2026 cbradney 1041
void ActionManager::connectNewViewActions(ScribusView *currView)
1042
{
1043
        if (currView==NULL)
1044
                return;
7587 cbradney 1045
        connect( (*scrActions)["viewFitPreview"], SIGNAL(activated()), currView, SLOT(togglePreview()) );
2026 cbradney 1046
        connect( (*scrActions)["toolsZoomIn"], SIGNAL(activated()) , currView, SLOT(slotZoomIn()) );
1047
        connect( (*scrActions)["toolsZoomOut"], SIGNAL(activated()) , currView, SLOT(slotZoomOut()) );
2104 cbradney 1048
        connect( (*scrActions)["itemLowerToBottom"], SIGNAL(activated()), currView, SLOT(ToBack()) );
1049
        connect( (*scrActions)["itemRaiseToTop"], SIGNAL(activated()), currView, SLOT(ToFront()) );
2026 cbradney 1050
        connect( (*scrActions)["itemRaise"], SIGNAL(activated()), currView, SLOT(RaiseItem()) );
1051
        connect( (*scrActions)["itemLower"], SIGNAL(activated()), currView, SLOT(LowerItem()) );
1052
        connect( (*scrActions)["itemConvertToBezierCurve"], SIGNAL(activated()), currView, SLOT(ToBezierFrame()) );
1053
        connect( (*scrActions)["itemConvertToImageFrame"], SIGNAL(activated()), currView, SLOT(ToPicFrame()) );
1054
        connect( (*scrActions)["itemConvertToOutlines"], SIGNAL(activated()), currView, SLOT(TextToPath()) );
1055
        connect( (*scrActions)["itemConvertToPolygon"], SIGNAL(activated()), currView, SLOT(ToPolyFrame()) );
1056
        connect( (*scrActions)["itemConvertToTextFrame"], SIGNAL(activated()), currView, SLOT(ToTextFrame()) );
1057
        connect( (*scrActions)["itemAttachTextToPath"], SIGNAL(activated()), currView, SLOT(ToPathText()) );
1058
        connect( (*scrActions)["itemDetachTextFromPath"], SIGNAL(activated()), currView, SLOT(FromPathText()) );
2260 cbradney 1059
        connect( (*scrActions)["itemExtendedImageProperties"], SIGNAL(activated()), currView, SLOT(editExtendedImageProperties()) );
2026 cbradney 1060
}
1061
 
1062
void ActionManager::disconnectNewSelectionActions()
1063
{
1064
        disconnect( (*scrActions)["itemImageIsVisible"], 0, 0, 0);
4705 cbradney 1065
        //Only disconnect activatedData for data based actions or you will disconnect the internal signal
1066
        disconnect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)) , 0, 0);
1067
        disconnect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)) , 0, 0);
1068
        disconnect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)) , 0, 0);
1069
        disconnect( (*scrActions)["editClearContents"], 0, 0, 0);
2026 cbradney 1070
}
1071
 
5784 jghali 1072
void ActionManager::connectNewSelectionActions(ScribusView* /*currView*/, ScribusDoc* currDoc)
2026 cbradney 1073
{
4705 cbradney 1074
        connect( (*scrActions)["itemImageIsVisible"], SIGNAL(toggled(bool)), currDoc, SLOT(itemSelection_ToggleImageShown()) );
1075
        connect( (*scrActions)["itemPreviewLow"], SIGNAL(activatedData(int)), currDoc, SLOT(itemSelection_ChangePreviewResolution(int)) );
1076
        connect( (*scrActions)["itemPreviewNormal"], SIGNAL(activatedData(int)), currDoc, SLOT(itemSelection_ChangePreviewResolution(int)) );
1077
        connect( (*scrActions)["itemPreviewFull"], SIGNAL(activatedData(int)), currDoc, SLOT(itemSelection_ChangePreviewResolution(int)) );
1078
        connect( (*scrActions)["editClearContents"], SIGNAL(activated()), currDoc, SLOT(itemSelection_ClearItem()) );
2026 cbradney 1079
}
2246 subik 1080
 
1993 cbradney 1081
void ActionManager::saveActionShortcutsPreEditMode()
1082
{
1083
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
1084
                (*scrActions)[*it]->saveShortcut();
1085
        for ( QStringList::Iterator it = nonEditActionNames->begin(); it != nonEditActionNames->end(); ++it )
2246 subik 1086
                (*scrActions)[*it]->saveShortcut();
1993 cbradney 1087
 
1088
}
1089
 
1090
void ActionManager::restoreActionShortcutsPostEditMode()
1091
{
1092
        for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
1093
                (*scrActions)[*it]->restoreShortcut();
1094
        for ( QStringList::Iterator it = nonEditActionNames->begin(); it != nonEditActionNames->end(); ++it )
2246 subik 1095
                (*scrActions)[*it]->restoreShortcut();
1993 cbradney 1096
}
1097
 
8501 cbradney 1098
void ActionManager::enableActionStringList(QMap<QString, QPointer<ScrAction> > *actionMap, QStringList *list, bool enabled, bool checkingUnicode, const QString& fontName)
1993 cbradney 1099
{
1100
        for ( QStringList::Iterator it = list->begin(); it != list->end(); ++it )
1101
        {
1102
                if(!checkingUnicode)
4881 cbradney 1103
                        (*actionMap)[*it]->setEnabled(enabled);
1993 cbradney 1104
                else
1105
                {
1106
                        //For UnicodeChar actions, only enable when the current font has that character.
5243 cbradney 1107
                        if (mainWindow->HaveDoc && (*actionMap)[*it]->actionType()==ScrAction::UnicodeChar)
1993 cbradney 1108
                        {
4881 cbradney 1109
                                int charCode=(*actionMap)[*it]->actionInt();
2246 subik 1110
                                if(charCode==-1 ||
4881 cbradney 1111
                                        charCode==24 ||
1112
                                        charCode==26 ||
1113
                                        charCode==27 ||
1114
                                        charCode==28 ||
1115
                                        charCode==29 ||
1116
                                        charCode==30 ||
7087 subik 1117
                                        ((*mainWindow->doc->AllFonts)[fontName].usable() &&
5980 avox 1118
                                        (*mainWindow->doc->AllFonts)[fontName].canRender(charCode)) )
4881 cbradney 1119
                                                (*actionMap)[*it]->setEnabled(true);
1120
                                else
1121
                                        (*actionMap)[*it]->setEnabled(false);
1993 cbradney 1122
                        }
1123
                }
1124
        }
1125
}
1995 cbradney 1126
 
8501 cbradney 1127
void ActionManager::enableUnicodeActions(QMap<QString, QPointer<ScrAction> > *actionMap, bool enabled, const QString& fontName)
1995 cbradney 1128
{
4881 cbradney 1129
        enableActionStringList(actionMap, unicodeCharActionNames, enabled, enabled, fontName);
7201 cbradney 1130
        (*actionMap)["insertGlyph"]->setEnabled(enabled);
1995 cbradney 1131
}
2103 cbradney 1132
 
2108 cbradney 1133
void ActionManager::setPDFActions(ScribusView *currView)
2103 cbradney 1134
{
2108 cbradney 1135
        if (currView==NULL)
2103 cbradney 1136
                return;
5243 cbradney 1137
        PageItem* currItem = mainWindow->doc->m_Selection->itemAt(0);
2103 cbradney 1138
        if (currItem==NULL)
1139
                return;
1140
 
1141
        disconnect( (*scrActions)["itemPDFIsBookmark"], 0, 0, 0);
1142
        disconnect( (*scrActions)["itemPDFIsAnnotation"], 0, 0, 0);
2246 subik 1143
 
3625 avox 1144
        if (!currItem->asTextFrame())
2103 cbradney 1145
        {
1146
                (*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
1147
                (*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
1148
                (*scrActions)["itemPDFIsAnnotation"]->setOn(false);
1149
                (*scrActions)["itemPDFIsBookmark"]->setOn(false);
1150
                (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
1151
                (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
1152
                return;
1153
        }
1154
 
1155
        (*scrActions)["itemPDFIsAnnotation"]->setEnabled(true);
1156
        (*scrActions)["itemPDFIsBookmark"]->setEnabled(true);
4084 cbradney 1157
        (*scrActions)["itemPDFIsAnnotation"]->setOn(currItem->isAnnotation());
2103 cbradney 1158
        (*scrActions)["itemPDFIsBookmark"]->setOn(currItem->isBookmark);
4084 cbradney 1159
        if (currItem->isAnnotation())
2103 cbradney 1160
        {
4084 cbradney 1161
                int aType=currItem->annotation().Type();
1162
                bool setter=((aType == 0) || (aType == 1) || (aType > 9));
2103 cbradney 1163
                (*scrActions)["itemPDFAnnotationProps"]->setEnabled(setter);
1164
                (*scrActions)["itemPDFFieldProps"]->setEnabled(!setter);
1165
        }
1166
        else
1167
        {
1168
                (*scrActions)["itemPDFAnnotationProps"]->setEnabled(false);
1169
                (*scrActions)["itemPDFFieldProps"]->setEnabled(false);
1170
        }
2108 cbradney 1171
        connect( (*scrActions)["itemPDFIsAnnotation"], SIGNAL(activated()), currView, SLOT(ToggleAnnotation()) );
1172
        connect( (*scrActions)["itemPDFIsBookmark"], SIGNAL(activated()), currView, SLOT(ToggleBookmark()) );
2103 cbradney 1173
}
2161 cbradney 1174
 
1175
void ActionManager::languageChange()
1176
{
2170 cbradney 1177
        //File Menu
2352 fschmid 1178
        (*scrActions)["fileNew"]->setTexts( tr("&New"));
1179
        (*scrActions)["fileOpen"]->setTexts( tr("&Open..."));
1180
        (*scrActions)["fileClose"]->setTexts( tr("&Close"));
1181
        (*scrActions)["fileSave"]->setTexts( tr("&Save"));
1182
        (*scrActions)["fileSaveAs"]->setTexts( tr("Save &As..."));
1183
        (*scrActions)["fileRevert"]->setTexts( tr("Re&vert to Saved"));
1184
        (*scrActions)["fileCollect"]->setTexts( tr("Collect for O&utput..."));
1185
        (*scrActions)["fileImportText"]->setTexts( tr("Get Text..."));
1186
        (*scrActions)["fileImportAppendText"]->setTexts( tr("Append &Text..."));
1187
        (*scrActions)["fileImportImage"]->setTexts( tr("Get Image..."));
1188
        (*scrActions)["fileExportText"]->setTexts( tr("Save &Text..."));
5357 cbradney 1189
        (*scrActions)["fileExportAsEPS"]->setTexts( tr("Save as &EPS..."));
2352 fschmid 1190
        (*scrActions)["fileExportAsPDF"]->setTexts( tr("Save as P&DF..."));
1191
        (*scrActions)["fileDocSetup"]->setTexts( tr("Document &Setup..."));
7087 subik 1192
        (*scrActions)["filePreferences"]->setTexts( tr("P&references..."));
2352 fschmid 1193
        (*scrActions)["filePrint"]->setTexts( tr("&Print..."));
3165 fschmid 1194
        (*scrActions)["PrintPreview"]->setTexts( tr("Print Previe&w"));
2352 fschmid 1195
        (*scrActions)["fileQuit"]->setTexts( tr("&Quit"));
2170 cbradney 1196
        //Edit Menu
2352 fschmid 1197
        (*scrActions)["editUndoAction"]->setTexts( tr("&Undo"));
1198
        (*scrActions)["editRedoAction"]->setTexts( tr("&Redo"));
1199
        (*scrActions)["editActionMode"]->setTexts( tr("&Item Action Mode"));
1200
        (*scrActions)["editCut"]->setTexts( tr("Cu&t"));
1201
        (*scrActions)["editCopy"]->setTexts( tr("&Copy"));
1202
        (*scrActions)["editPaste"]->setTexts( tr("&Paste"));
4952 cbradney 1203
        (*scrActions)["editCopyContents"]->setTexts( tr("&Copy"));
1204
        (*scrActions)["editPasteContents"]->setTexts( tr("&Paste"));
1205
        (*scrActions)["editPasteContentsAbs"]->setTexts( tr("Paste (&Absolute)"));
1206
        (*scrActions)["editClearContents"]->setTexts( tr("C&lear"));
2352 fschmid 1207
        (*scrActions)["editSelectAll"]->setTexts( tr("Select &All"));
1208
        (*scrActions)["editDeselectAll"]->setTexts( tr("&Deselect All"));
1209
        (*scrActions)["editSearchReplace"]->setTexts( tr("&Search/Replace..."));
1210
        (*scrActions)["editEditWithImageEditor"]->setTexts( tr("Edit Image..."));
1211
        (*scrActions)["editColors"]->setTexts( tr("C&olors..."));
6368 fschmid 1212
        (*scrActions)["editPatterns"]->setTexts( tr("Patterns..."));
4829 tsoots 1213
        (*scrActions)["editStyles"]->setTexts( tr("S&tyles..."));
2352 fschmid 1214
        (*scrActions)["editMasterPages"]->setTexts( tr("&Master Pages..."));
3142 cbradney 1215
        (*scrActions)["editJavascripts"]->setTexts( tr("&JavaScripts..."));
2246 subik 1216
 
2170 cbradney 1217
        int font_sizes[] = {7, 9, 10, 11, 12, 14, 18, 24, 36, 48, 60, 72};
1218
        size_t f_size = sizeof(font_sizes) / sizeof(*font_sizes);
1219
        for (uint s = 0; s < f_size; ++s)
1220
        {
1221
                QString fontSizeName=QString("fontSize%1").arg(font_sizes[s]);
2352 fschmid 1222
                (*scrActions)[fontSizeName]->setTexts( tr("%1 pt").arg(font_sizes[s]));
2170 cbradney 1223
        }
2352 fschmid 1224
        (*scrActions)["fontSizeOther"]->setTexts( tr("&Other..."));
1225
        (*scrActions)["alignLeft"]->setTexts( tr("&Left"));
1226
        (*scrActions)["alignCenter"]->setTexts( tr("&Center"));
1227
        (*scrActions)["alignRight"]->setTexts( tr("&Right"));
1228
        (*scrActions)["alignBlock"]->setTexts( tr("&Block"));
1229
        (*scrActions)["alignForced"]->setTexts( tr("&Forced"));
2170 cbradney 1230
 
1231
        for (uint i=0; i<=100 ; i+=10)
1232
        {
1233
                QString shadeName=QString("shade%1").arg(i);
2352 fschmid 1234
                (*scrActions)[shadeName]->setTexts( tr("&%1 %").arg(i));
2170 cbradney 1235
        }
1236
 
2352 fschmid 1237
        (*scrActions)["shadeOther"]->setTexts( tr("&Other..."));
1238
        (*scrActions)["typeEffectNormal"]->setTexts( tr("&Normal"));
1239
        (*scrActions)["typeEffectUnderline"]->setTexts( tr("&Underline"));
1240
        (*scrActions)["typeEffectUnderlineWords"]->setTexts( tr("Underline &Words"));
1241
        (*scrActions)["typeEffectStrikeThrough"]->setTexts( tr("&Strike Through"));
1242
        (*scrActions)["typeEffectAllCaps"]->setTexts( tr("&All Caps"));
1243
        (*scrActions)["typeEffectSmallCaps"]->setTexts( tr("Small &Caps"));
1244
        (*scrActions)["typeEffectSuperscript"]->setTexts( tr("Su&perscript"));
1245
        (*scrActions)["typeEffectSubscript"]->setTexts( tr("Su&bscript"));
4847 cbradney 1246
        (*scrActions)["typeEffectOutline"]->setTexts( tr("&Outline", "type effect"));
2352 fschmid 1247
        (*scrActions)["typeEffectShadow"]->setTexts( tr("S&hadow"));
2170 cbradney 1248
 
4572 cbradney 1249
        (*scrActions)["styleImageEffects"]->setTexts( tr("&Image Effects"));
2352 fschmid 1250
        (*scrActions)["styleTabulators"]->setTexts( tr("&Tabulators..."));
2246 subik 1251
 
2170 cbradney 1252
        //Item Menu
2352 fschmid 1253
        (*scrActions)["itemDuplicate"]->setTexts( tr("D&uplicate"));
1254
        (*scrActions)["itemMulDuplicate"]->setTexts( tr("&Multiple Duplicate"));
1255
        (*scrActions)["itemDelete"]->setTexts( tr("&Delete"));
1256
        (*scrActions)["itemGroup"]->setTexts( tr("&Group"));
1257
        (*scrActions)["itemUngroup"]->setTexts( tr("&Ungroup"));
1258
        (*scrActions)["itemLock"]->setTexts( tr("Is &Locked"));
1259
        (*scrActions)["itemLockSize"]->setTexts( tr("Si&ze is Locked"));
4698 cbradney 1260
        (*scrActions)["itemPrintingEnabled"]->setTexts( tr("&Printing Enabled"));
4699 cbradney 1261
        (*scrActions)["itemFlipH"]->setTexts( tr("&Flip Horizontally"));
1262
        (*scrActions)["itemFlipV"]->setTexts( tr("&Flip Vertically"));
2352 fschmid 1263
        (*scrActions)["itemLowerToBottom"]->setTexts( tr("Lower to &Bottom"));
1264
        (*scrActions)["itemRaiseToTop"]->setTexts( tr("Raise to &Top"));
1265
        (*scrActions)["itemLower"]->setTexts( tr("&Lower"));
1266
        (*scrActions)["itemRaise"]->setTexts( tr("&Raise"));
1267
        (*scrActions)["itemSendToScrapbook"]->setTexts( tr("Send to S&crapbook"));
6410 fschmid 1268
        (*scrActions)["itemSendToPattern"]->setTexts( tr("Send to Patterns"));
2352 fschmid 1269
        (*scrActions)["itemAttributes"]->setTexts( tr("&Attributes..."));
3706 fschmid 1270
        (*scrActions)["itemImageInfo"]->setTexts( tr("More Info..."));
2352 fschmid 1271
        (*scrActions)["itemImageIsVisible"]->setTexts( tr("I&mage Visible"));
1272
        (*scrActions)["itemUpdateImage"]->setTexts( tr("&Update Image"));
1273
        (*scrActions)["itemAdjustFrameToImage"]->setTexts( tr("Adjust Frame to Image"));
1274
        (*scrActions)["itemExtendedImageProperties"]->setTexts( tr("Extended Image Properties"));
1275
        (*scrActions)["itemPreviewLow"]->setTexts( tr("&Low Resolution"));
1276
        (*scrActions)["itemPreviewNormal"]->setTexts( tr("&Normal Resolution"));
1277
        (*scrActions)["itemPreviewFull"]->setTexts( tr("&Full Resolution"));
1278
        (*scrActions)["itemPDFIsBookmark"]->setTexts( tr("Is PDF &Bookmark"));
1279
        (*scrActions)["itemPDFIsAnnotation"]->setTexts( tr("Is PDF A&nnotation"));
1280
        (*scrActions)["itemPDFAnnotationProps"]->setTexts( tr("Annotation P&roperties"));
1281
        (*scrActions)["itemPDFFieldProps"]->setTexts( tr("Field P&roperties"));
1282
        (*scrActions)["itemShapeEdit"]->setTexts( tr("&Edit Shape..."));
1283
        (*scrActions)["itemAttachTextToPath"]->setTexts( tr("&Attach Text to Path"));
1284
        (*scrActions)["itemDetachTextFromPath"]->setTexts( tr("&Detach Text from Path"));
1285
        (*scrActions)["itemCombinePolygons"]->setTexts( tr("&Combine Polygons"));
1286
        (*scrActions)["itemSplitPolygons"]->setTexts( tr("Split &Polygons"));
1287
        (*scrActions)["itemConvertToBezierCurve"]->setTexts( tr("&Bezier Curve"));
1288
        (*scrActions)["itemConvertToImageFrame"]->setTexts( tr("&Image Frame"));
4847 cbradney 1289
        (*scrActions)["itemConvertToOutlines"]->setTexts( tr("&Outlines", "Convert to oulines"));
2352 fschmid 1290
        (*scrActions)["itemConvertToPolygon"]->setTexts( tr("&Polygon"));
1291
        (*scrActions)["itemConvertToTextFrame"]->setTexts( tr("&Text Frame"));
2170 cbradney 1292
 
1293
        //Insert Menu
6083 cbradney 1294
        (*scrActions)["insertFrame"]->setTexts( tr("&Frame..."));
2352 fschmid 1295
        (*scrActions)["insertGlyph"]->setTexts( tr("&Glyph..."));
1296
        (*scrActions)["insertSampleText"]->setTexts( tr("Sample Text"));
7350 fschmid 1297
        (*scrActions)["stickyTools"]->setTexts( tr("Sticky Tools"));
2246 subik 1298
 
2170 cbradney 1299
        //Page menu
2352 fschmid 1300
        (*scrActions)["pageInsert"]->setTexts( tr("&Insert..."));
1301
        (*scrActions)["pageImport"]->setTexts( tr("Im&port..."));
1302
        (*scrActions)["pageDelete"]->setTexts( tr("&Delete..."));
1303
        (*scrActions)["pageCopy"]->setTexts( tr("&Copy..."));
1304
        (*scrActions)["pageMove"]->setTexts( tr("&Move..."));
1305
        (*scrActions)["pageApplyMasterPage"]->setTexts( tr("&Apply Master Page..."));
3187 fschmid 1306
        (*scrActions)["pageCopyToMasterPage"]->setTexts( tr("Convert to Master Page..."));
2352 fschmid 1307
        (*scrActions)["pageManageGuides"]->setTexts( tr("Manage &Guides..."));
2872 fschmid 1308
        (*scrActions)["pageManageMargins"]->setTexts( tr("Manage Page Properties..."));
2246 subik 1309
 
2170 cbradney 1310
        //View Menu
7164 fschmid 1311
        (*scrActions)["viewFitInWindow"]->setTexts( tr("&Fit to Height"));
1312
        (*scrActions)["viewFitWidth"]->setTexts( tr("Fit to Width"));
2352 fschmid 1313
        (*scrActions)["viewFit50"]->setTexts( tr("&50%"));
1314
        (*scrActions)["viewFit75"]->setTexts( tr("&75%"));
1315
        (*scrActions)["viewFit100"]->setTexts( tr("&100%"));
1316
        (*scrActions)["viewFit200"]->setTexts( tr("&200%"));
9744 jghali 1317
        (*scrActions)["viewFit400"]->setTexts( tr("&400%"));
7587 cbradney 1318
        (*scrActions)["viewFitPreview"]->setTexts( tr("Preview Mode"));
2352 fschmid 1319
        (*scrActions)["viewShowMargins"]->setTexts( tr("Show &Margins"));
7051 fschmid 1320
        (*scrActions)["viewShowBleeds"]->setTexts( tr("Show Bleeds"));
2352 fschmid 1321
        (*scrActions)["viewShowFrames"]->setTexts( tr("Show &Frames"));
5584 fschmid 1322
        (*scrActions)["viewShowLayerMarkers"]->setTexts( tr("Show Layer Indicators"));
2352 fschmid 1323
        (*scrActions)["viewShowImages"]->setTexts( tr("Show &Images"));
1324
        (*scrActions)["viewShowGrid"]->setTexts( tr("Show &Grid"));
1325
        (*scrActions)["viewShowGuides"]->setTexts( tr("Show G&uides"));
5384 cbradney 1326
        (*scrActions)["viewShowColumnBorders"]->setTexts( tr("Show Text Frame Columns"));
2352 fschmid 1327
        (*scrActions)["viewShowBaseline"]->setTexts( tr("Show &Baseline Grid"));
1328
        (*scrActions)["viewShowTextChain"]->setTexts( tr("Show &Text Chain"));
2353 fschmid 1329
        (*scrActions)["viewShowTextControls"]->setTexts( tr("Show Control Characters"));
4651 cbradney 1330
        (*scrActions)["viewShowRulers"]->setTexts( tr("Show Rulers"));
2863 fschmid 1331
        (*scrActions)["viewRulerMode"]->setTexts( tr("Rulers relative to Page"));
2352 fschmid 1332
        (*scrActions)["viewSnapToGrid"]->setTexts( tr("Sn&ap to Grid"));
1333
        (*scrActions)["viewSnapToGuides"]->setTexts( tr("Sna&p to Guides"));
1334
//      (*scrActions)["viewNewView"]->setTexts( tr("New View"));
2170 cbradney 1335
 
1336
        //Tool menu
2352 fschmid 1337
        (*scrActions)["toolsProperties"]->setTexts( tr("&Properties"));
4554 cbradney 1338
        (*scrActions)["toolsOutline"]->setTexts( tr("&Outline", "Document Outline Palette"));
2352 fschmid 1339
        (*scrActions)["toolsScrapbook"]->setTexts( tr("&Scrapbook"));
1340
        (*scrActions)["toolsLayers"]->setTexts( tr("&Layers"));
2589 cbradney 1341
        (*scrActions)["toolsPages"]->setTexts( tr("&Arrange Pages"));
2352 fschmid 1342
        (*scrActions)["toolsBookmarks"]->setTexts( tr("&Bookmarks"));
1343
        (*scrActions)["toolsMeasurements"]->setTexts( tr("&Measurements"));
1344
        (*scrActions)["toolsActionHistory"]->setTexts( tr("Action &History"));
1345
        (*scrActions)["toolsPreflightVerifier"]->setTexts( tr("Preflight &Verifier"));
2364 cbradney 1346
        (*scrActions)["toolsAlignDistribute"]->setTexts( tr("&Align and Distribute"));
2352 fschmid 1347
        (*scrActions)["toolsToolbarTools"]->setTexts( tr("&Tools"));
1348
        (*scrActions)["toolsToolbarPDF"]->setTexts( tr("P&DF Tools"));
2246 subik 1349
 
2170 cbradney 1350
        //toolbar only items
2352 fschmid 1351
        (*scrActions)["toolsSelect"]->setTexts( tr("Select Item"));
1352
        (*scrActions)["toolsInsertTextFrame"]->setMenuText( tr("&Text Frame"));
1353
        (*scrActions)["toolsInsertImageFrame"]->setMenuText( tr("&Image Frame"));
1354
        (*scrActions)["toolsInsertTableFrame"]->setMenuText( tr("T&able"));
1355
        (*scrActions)["toolsInsertShape"]->setMenuText( tr("&Shape"));
1356
        (*scrActions)["toolsInsertPolygon"]->setMenuText( tr("&Polygon"));
1357
        (*scrActions)["toolsInsertLine"]->setMenuText( tr("&Line"));
1358
        (*scrActions)["toolsInsertBezier"]->setMenuText( tr("&Bezier Curve"));
1359
        (*scrActions)["toolsInsertFreehandLine"]->setMenuText( tr("&Freehand Line"));
1360
        (*scrActions)["toolsRotate"]->setTexts( tr("Rotate Item"));
1361
        (*scrActions)["toolsZoom"]->setTexts( tr("Zoom in or out"));
1362
        (*scrActions)["toolsZoomIn"]->setTexts( tr("Zoom in"));
1363
        (*scrActions)["toolsZoomOut"]->setTexts( tr("Zoom out"));
1364
        (*scrActions)["toolsEditContents"]->setTexts( tr("Edit Contents of Frame"));
1365
        (*scrActions)["toolsEditWithStoryEditor"]->setMenuText( tr("Edit Text..."));
1366
        (*scrActions)["toolsLinkTextFrame"]->setTexts( tr("Link Text Frames"));
1367
        (*scrActions)["toolsUnlinkTextFrame"]->setTexts( tr("Unlink Text Frames"));
1368
        (*scrActions)["toolsEyeDropper"]->setTexts( tr("&Eye Dropper"));
1369
        (*scrActions)["toolsCopyProperties"]->setTexts( tr("Copy Item Properties"));
2246 subik 1370
 
2352 fschmid 1371
        (*scrActions)["toolsEditWithStoryEditor"]->setText( tr("Edit the text with the Story Editor"));
2246 subik 1372
 
2352 fschmid 1373
        (*scrActions)["toolsInsertTextFrame"]->setText( tr("Insert Text Frame"));
1374
        (*scrActions)["toolsInsertImageFrame"]->setText( tr("Insert Image Frame"));
1375
        (*scrActions)["toolsInsertTableFrame"]->setText( tr("Insert Table"));
1376
        (*scrActions)["toolsInsertShape"]->setText( tr("Insert Shape"));
1377
        (*scrActions)["toolsInsertPolygon"]->setText( tr("Insert Polygon"));
1378
        (*scrActions)["toolsInsertLine"]->setText( tr("Insert Line"));
1379
        (*scrActions)["toolsInsertBezier"]->setText( tr("Insert Bezier Curve"));
1380
        (*scrActions)["toolsInsertFreehandLine"]->setText( tr("Insert Freehand Line"));
7087 subik 1381
 
5277 cbradney 1382
        (*scrActions)["toolsPDFPushButton"]->setTexts( tr("Insert PDF Push Button"));
1383
        (*scrActions)["toolsPDFTextField"]->setTexts( tr("Insert PDF Text Field"));
1384
        (*scrActions)["toolsPDFCheckBox"]->setTexts( tr("Insert PDF Check Box"));
1385
        (*scrActions)["toolsPDFComboBox"]->setTexts( tr("Insert PDF Combo Box"));
1386
        (*scrActions)["toolsPDFListBox"]->setTexts( tr("Insert PDF List Box"));
1387
        (*scrActions)["toolsPDFAnnotText"]->setTexts( tr("Insert Text Annotation"));
1388
        (*scrActions)["toolsPDFAnnotLink"]->setTexts( tr("Insert Link Annotation"));
2170 cbradney 1389
 
7087 subik 1390
 
2170 cbradney 1391
        //Extras Menu
2352 fschmid 1392
        (*scrActions)["extrasManagePictures"]->setTexts( tr("&Manage Pictures"));
1393
        (*scrActions)["extrasHyphenateText"]->setTexts( tr("&Hyphenate Text"));
2621 fschmid 1394
        (*scrActions)["extrasDeHyphenateText"]->setTexts( tr("Dehyphenate Text"));
2352 fschmid 1395
        (*scrActions)["extrasGenerateTableOfContents"]->setTexts( tr("&Generate Table Of Contents"));
2170 cbradney 1396
 
3097 cbradney 1397
        //Windows Menu
1398
        (*scrActions)["windowsCascade"]->setMenuText( tr("&Cascade"));
1399
        (*scrActions)["windowsTile"]->setMenuText( tr("&Tile"));
1400
 
2170 cbradney 1401
        //Help Menu
2352 fschmid 1402
        (*scrActions)["helpAboutScribus"]->setTexts( tr("&About Scribus"));
3247 craig 1403
        (*scrActions)["helpAboutPlugins"]->setTexts( tr("&About Plug-ins"));
2352 fschmid 1404
        (*scrActions)["helpAboutQt"]->setTexts( tr("About &Qt"));
1405
        (*scrActions)["helpTooltips"]->