Subversion Repositories Scribus

Rev

Rev 4688 | Rev 5243 | 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                : Jan 2005
9
    copyright            : (C) 2005 by Craig Bradney
10
    email                : cbradney@zip.com.au
11
 ***************************************************************************/
12
 
13
/***************************************************************************
14
 *                                                                         *
15
 *   This program is free software; you can redistribute it and/or modify  *
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
#ifndef ACTIONMANAGER_H
22
#define ACTIONMANAGER_H
23
 
24
#include <qobject.h> 
25
#include <qstring.h>
26
#include <qmap.h>
27
#include <qguardedptr.h>
28
#include <qdict.h>
29
 
2969 craig 30
#include "scribusapi.h"
1993 cbradney 31
#include "scraction.h"
32
 
4688 cbradney 33
class ScribusDoc;
4026 craig 34
class ScribusMainWindow;
2186 cbradney 35
class ScribusQApp;
2026 cbradney 36
class ScribusView;
1993 cbradney 37
class UndoManager;
38
/**
39
@author Craig Bradney
40
*/
2969 craig 41
class SCRIBUS_API ActionManager : public QObject
1993 cbradney 42
{
43
        Q_OBJECT
44
 
4557 cbradney 45
        friend class StoryEditor;
1993 cbradney 46
        public:
2187 cbradney 47
                ActionManager ( QObject * parent, const char * name ); 
1993 cbradney 48
                ~ActionManager() {};
49
 
50
                void createActions();
51
                void disconnectModeActions();
52
                void connectModeActions();
2026 cbradney 53
                void disconnectNewViewActions();
54
                void connectNewViewActions(ScribusView *);
4688 cbradney 55
                void disconnectNewDocActions();
56
                void connectNewDocActions(ScribusDoc *);
2026 cbradney 57
                void disconnectNewSelectionActions();
4688 cbradney 58
                void connectNewSelectionActions(ScribusView *,ScribusDoc *);
1993 cbradney 59
                void saveActionShortcutsPreEditMode();
60
                void restoreActionShortcutsPostEditMode();
4881 cbradney 61
                void enableActionStringList(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, QStringList *list, bool enabled, bool checkingUnicode=false, const QString& fontName=QString::null);
62
                void enableUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, bool enabled, const QString& fontName=QString::null);
2103 cbradney 63
                void setPDFActions(ScribusView *);
1993 cbradney 64
 
2161 cbradney 65
        public slots:
66
                void languageChange();
67
 
4557 cbradney 68
        protected:
1993 cbradney 69
                void initFileMenuActions();
70
                void initEditMenuActions();
71
                void initStyleMenuActions();
72
                void initItemMenuActions();
73
                void initInsertMenuActions();
74
                void initPageMenuActions();
75
                void initViewMenuActions();
76
                void initToolsMenuActions();
77
                void initExtrasMenuActions();
78
                void initWindowsMenuActions();
79
                void initScriptMenuActions();
80
                void initHelpMenuActions();
4557 cbradney 81
                static void initUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap, QWidget *actionParent, QStringList *actionNamesList);
1993 cbradney 82
                void initSpecialActions();
4557 cbradney 83
                static void languageChangeUnicodeActions(QMap<QString, QGuardedPtr<ScrAction> > *actionMap);
1993 cbradney 84
 
3580 avox 85
                QPixmap noIcon;
4026 craig 86
                ScribusMainWindow *ScMW;
2186 cbradney 87
                ScribusQApp *ScQApp;
1993 cbradney 88
                UndoManager *undoManager;
89
                QMap<QString, QGuardedPtr<ScrAction> > *scrActions;
90
                QDict<QActionGroup> *scrActionGroups;
91
                QStringList *modeActionNames;
92
                QStringList *nonEditActionNames;
93
                QStringList *unicodeCharActionNames;
94
 
95
};
96
 
97
#endif