Rev 2186 | Rev 2969 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1993 | cbradney | 1 | /*************************************************************************** |
2 | begin : Jan 2005 |
||
3 | copyright : (C) 2005 by Craig Bradney |
||
4 | email : cbradney@zip.com.au |
||
5 | ***************************************************************************/ |
||
6 | |||
7 | /*************************************************************************** |
||
8 | * * |
||
9 | * This program is free software; you can redistribute it and/or modify * |
||
10 | * it under the terms of the GNU General Public License as published by * |
||
11 | * the Free Software Foundation; either version 2 of the License, or * |
||
12 | * (at your option) any later version. * |
||
13 | * * |
||
14 | ***************************************************************************/ |
||
15 | #ifndef ACTIONMANAGER_H |
||
16 | #define ACTIONMANAGER_H |
||
17 | |||
18 | #include <qobject.h> |
||
19 | #include <qstring.h> |
||
20 | #include <qmap.h> |
||
21 | #include <qguardedptr.h> |
||
22 | #include <qdict.h> |
||
23 | |||
24 | #include "scraction.h" |
||
25 | |||
26 | class ScribusApp; |
||
2186 | cbradney | 27 | class ScribusQApp; |
2026 | cbradney | 28 | class ScribusView; |
1993 | cbradney | 29 | class UndoManager; |
30 | /** |
||
31 | @author Craig Bradney |
||
32 | */ |
||
33 | class ActionManager : public QObject |
||
34 | { |
||
35 | Q_OBJECT |
||
36 | |||
37 | public: |
||
2187 | cbradney | 38 | ActionManager ( QObject * parent, const char * name ); |
1993 | cbradney | 39 | ~ActionManager() {}; |
40 | |||
41 | void createActions(); |
||
42 | void disconnectModeActions(); |
||
43 | void connectModeActions(); |
||
2026 | cbradney | 44 | void disconnectNewViewActions(); |
45 | void connectNewViewActions(ScribusView *); |
||
46 | void disconnectNewSelectionActions(); |
||
47 | void connectNewSelectionActions(ScribusView *); |
||
1993 | cbradney | 48 | void saveActionShortcutsPreEditMode(); |
49 | void restoreActionShortcutsPostEditMode(); |
||
1995 | cbradney | 50 | void enableActionStringList(QStringList *list, bool enabled, bool checkingUnicode=false); |
51 | void enableUnicodeActions(bool enabled); |
||
2103 | cbradney | 52 | void setPDFActions(ScribusView *); |
1993 | cbradney | 53 | |
2161 | cbradney | 54 | public slots: |
55 | void languageChange(); |
||
56 | |||
1993 | cbradney | 57 | private: |
58 | void initFileMenuActions(); |
||
59 | void initEditMenuActions(); |
||
60 | void initStyleMenuActions(); |
||
61 | void initItemMenuActions(); |
||
62 | void initInsertMenuActions(); |
||
63 | void initPageMenuActions(); |
||
64 | void initViewMenuActions(); |
||
65 | void initToolsMenuActions(); |
||
66 | void initExtrasMenuActions(); |
||
67 | void initWindowsMenuActions(); |
||
68 | void initScriptMenuActions(); |
||
69 | void initHelpMenuActions(); |
||
70 | void initSpecialActions(); |
||
71 | |||
72 | ScribusApp *ScApp; |
||
2186 | cbradney | 73 | ScribusQApp *ScQApp; |
1993 | cbradney | 74 | UndoManager *undoManager; |
75 | QMap<QString, QGuardedPtr<ScrAction> > *scrActions; |
||
76 | QDict<QActionGroup> *scrActionGroups; |
||
77 | QStringList *modeActionNames; |
||
78 | QStringList *nonEditActionNames; |
||
79 | QStringList *unicodeCharActionNames; |
||
80 | |||
81 | }; |
||
82 | |||
83 | #endif |