Changeset View
Changeset View
Standalone View
Standalone View
krusader/krglobal.h
Show All 25 Lines | |||||
26 | #include <QKeySequence> | 26 | #include <QKeySequence> | ||
27 | 27 | | |||
28 | #include <KConfigCore/KConfigGroup> | 28 | #include <KConfigCore/KConfigGroup> | ||
29 | 29 | | |||
30 | class KConfig; | 30 | class KConfig; | ||
31 | class KMountMan; | 31 | class KMountMan; | ||
32 | class KrBookmarkHandler; | 32 | class KrBookmarkHandler; | ||
33 | class KRslots; | 33 | class KRslots; | ||
34 | class KIconLoader; | | |||
35 | class KrusaderView; | 34 | class KrusaderView; | ||
36 | class UserAction; | 35 | class UserAction; | ||
37 | class JobMan; | 36 | class JobMan; | ||
38 | class QWidget; | 37 | class QWidget; | ||
39 | class KrPanel; | 38 | class KrPanel; | ||
40 | 39 | | |||
41 | // global references to frequently used objects | 40 | // global references to frequently used objects | ||
42 | 41 | | |||
43 | class KrGlobal | 42 | class KrGlobal | ||
44 | { | 43 | { | ||
45 | public: | 44 | public: | ||
46 | static KConfig *config; // allow everyone to access the config | 45 | static KConfig *config; // allow everyone to access the config | ||
47 | static KMountMan *mountMan; // krusader's Mount Manager | 46 | static KMountMan *mountMan; // krusader's Mount Manager | ||
48 | static KrBookmarkHandler *bookman; | 47 | static KrBookmarkHandler *bookman; | ||
49 | static KRslots *slot; | 48 | static KRslots *slot; | ||
50 | static KIconLoader *iconLoader; // the app's icon loader | | |||
51 | static KrusaderView *mainView; // The GUI | 49 | static KrusaderView *mainView; // The GUI | ||
52 | static QWidget *mainWindow; | 50 | static QWidget *mainWindow; | ||
53 | static UserAction *userAction; | 51 | static UserAction *userAction; | ||
54 | static JobMan *jobMan; | 52 | static JobMan *jobMan; | ||
55 | // static ListPanel *activePanel; | 53 | // static ListPanel *activePanel; | ||
56 | static KrPanel *activePanel(); | 54 | static KrPanel *activePanel(); | ||
57 | 55 | | |||
58 | //HACK - used by [ListerTextArea|KrSearchDialog|LocateDlg]:keyPressEvent() | 56 | //HACK - used by [ListerTextArea|KrSearchDialog|LocateDlg]:keyPressEvent() | ||
59 | static QKeySequence copyShortcut; | 57 | static QKeySequence copyShortcut; | ||
60 | 58 | | |||
61 | // static void enableAction(const char *name, bool enable); | 59 | // static void enableAction(const char *name, bool enable); | ||
62 | // static QAction *getAction(const char *name); | 60 | // static QAction *getAction(const char *name); | ||
63 | 61 | | |||
64 | /** Version of saved configuration. Use this to detect configuration updates. */ | 62 | /** Version of saved configuration. Use this to detect configuration updates. */ | ||
65 | static const int sConfigVersion = 1; | 63 | static const int sConfigVersion = 1; | ||
66 | static int sCurrentConfigVersion; | 64 | static int sCurrentConfigVersion; | ||
67 | }; | 65 | }; | ||
68 | 66 | | |||
69 | #define krConfig KrGlobal::config | 67 | #define krConfig KrGlobal::config | ||
70 | #define krMtMan (*(KrGlobal::mountMan)) | 68 | #define krMtMan (*(KrGlobal::mountMan)) | ||
71 | #define krBookMan KrGlobal::bookman | 69 | #define krBookMan KrGlobal::bookman | ||
72 | #define SLOTS KrGlobal::slot | 70 | #define SLOTS KrGlobal::slot | ||
73 | #define krLoader KrGlobal::iconLoader | | |||
74 | #define MAIN_VIEW KrGlobal::mainView | 71 | #define MAIN_VIEW KrGlobal::mainView | ||
75 | #define krMainWindow KrGlobal::mainWindow | 72 | #define krMainWindow KrGlobal::mainWindow | ||
76 | #define krUserAction KrGlobal::userAction | 73 | #define krUserAction KrGlobal::userAction | ||
77 | #define krJobMan KrGlobal::jobMan | 74 | #define krJobMan KrGlobal::jobMan | ||
78 | 75 | | |||
79 | #define ACTIVE_PANEL (KrGlobal::activePanel()) | 76 | #define ACTIVE_PANEL (KrGlobal::activePanel()) | ||
80 | 77 | | |||
81 | #define ACTIVE_MNG (MAIN_VIEW->activeManager()) | 78 | #define ACTIVE_MNG (MAIN_VIEW->activeManager()) | ||
Show All 15 Lines |