author | ulf69 <ulf69> | 2004-08-06 20:29:00 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-06 20:29:00 (UTC) |
commit | 38d84409bcca83516eb816461c8b79b4cf6cbf57 (patch) (unidiff) | |
tree | f7cc928c007ed6f4bca43d7474343d78bd0f4eab /microkde/kutils/kcmultidialog.h | |
parent | 40ac88770c32ae78e194096e758ef3818d2fb434 (diff) | |
download | kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.zip kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.tar.gz kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.tar.bz2 |
expanded functionality of kcmultidialog to support other applications
Diffstat (limited to 'microkde/kutils/kcmultidialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kutils/kcmultidialog.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h index 63d5d42..a42555f 100644 --- a/microkde/kutils/kcmultidialog.h +++ b/microkde/kutils/kcmultidialog.h | |||
@@ -1,147 +1,149 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (c) 2000 Matthias Elter <elter@kde.org> | 2 | Copyright (c) 2000 Matthias Elter <elter@kde.org> |
3 | Copyright (c) 2003 Daniel Molkentin <molkentin@kde.org> | 3 | Copyright (c) 2003 Daniel Molkentin <molkentin@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef KCMULTIDIALOG_H | 22 | #ifndef KCMULTIDIALOG_H |
23 | #define KCMULTIDIALOG_H | 23 | #define KCMULTIDIALOG_H |
24 | 24 | ||
25 | #include <qptrlist.h> | 25 | #include <qptrlist.h> |
26 | #include <qptrdict.h> | 26 | #include <qptrdict.h> |
27 | 27 | ||
28 | #include <kdialogbase.h> | 28 | #include <kdialogbase.h> |
29 | #include <kjanuswidget.h> | 29 | #include <kjanuswidget.h> |
30 | #include <kcmodule.h> | 30 | #include <kcmodule.h> |
31 | 31 | ||
32 | class KPrefs; | ||
32 | 33 | ||
33 | /** | 34 | /** |
34 | * A class that offers a @ref KDialogBase containing arbitrary KControl Modules | 35 | * A class that offers a @ref KDialogBase containing arbitrary KControl Modules |
35 | * | 36 | * |
36 | * @short A method that offers a @ref KDialogBase containing arbitrary | 37 | * @short A method that offers a @ref KDialogBase containing arbitrary |
37 | * KControl Modules. | 38 | * KControl Modules. |
38 | * | 39 | * |
39 | * @author Matthias Elter <elter@kde.org>, Daniel Molkentin <molkentin@kde.org> | 40 | * @author Matthias Elter <elter@kde.org>, Daniel Molkentin <molkentin@kde.org> |
40 | * @since 3.2 | 41 | * @since 3.2 |
41 | */ | 42 | */ |
42 | class KCMultiDialog : public KDialogBase | 43 | class KCMultiDialog : public KDialogBase |
43 | { | 44 | { |
44 | Q_OBJECT | 45 | Q_OBJECT |
45 | 46 | ||
46 | public: | 47 | public: |
47 | /** | 48 | /** |
48 | * Constructs a new KCMultiDialog | 49 | * Constructs a new KCMultiDialog |
49 | * | 50 | * |
50 | * @param parent The parent Widget | 51 | * @param parent The parent Widget |
51 | * @param name The widget name | 52 | * @param name The widget name |
52 | * @param baseGroup The baseGroup, if you want to call a module out of | 53 | * @param baseGroup The baseGroup, if you want to call a module out of |
53 | * kcontrol, just keep "settings" | 54 | * kcontrol, just keep "settings" |
54 | * @param modal If you pass true here, the dialog will be modal | 55 | * @param modal If you pass true here, the dialog will be modal |
55 | **/ | 56 | **/ |
56 | KCMultiDialog(const QString& baseGroup = QString::fromLatin1("settings"), | 57 | KCMultiDialog(KPrefs* prefs, const QString& baseGroup = QString::fromLatin1("settings"), |
57 | QWidget *parent=0, const char *name=0, | 58 | QWidget *parent=0, const char *name=0, |
58 | bool modal=false); | 59 | bool modal=false); |
59 | 60 | ||
60 | /** | 61 | /** |
61 | * Destructor | 62 | * Destructor |
62 | **/ | 63 | **/ |
63 | virtual ~KCMultiDialog(); | 64 | virtual ~KCMultiDialog(); |
64 | 65 | ||
65 | /** | 66 | /** |
66 | * Add a module. | 67 | * Add a module. |
67 | * | 68 | * |
68 | * @param module Specify the name of the module that is to be added | 69 | * @param module Specify the name of the module that is to be added |
69 | * to the list of modules the dialog will show. | 70 | * to the list of modules the dialog will show. |
70 | * | 71 | * |
71 | * @param withfallback Try harder to load the module. Might result | 72 | * @param withfallback Try harder to load the module. Might result |
72 | * in the module appearing outside the dialog. | 73 | * in the module appearing outside the dialog. |
73 | **/ | 74 | **/ |
74 | //US void addModule(const QString& module, bool withfallback=true); | 75 | //US void addModule(const QString& module, bool withfallback=true); |
75 | 76 | ||
76 | 77 | ||
77 | //US special method for microkde. We dop noty want to load everything dynamically. | 78 | //US special method for microkde. We dop noty want to load everything dynamically. |
78 | void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); | 79 | void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); |
79 | QVBox* getNewVBoxPage(const QString & modulename) ; | 80 | QVBox* getNewVBoxPage(const QString & modulename) ; |
80 | 81 | ||
81 | 82 | ||
82 | 83 | ||
83 | protected slots: | 84 | protected slots: |
84 | /** | 85 | /** |
85 | * This slot is called when the user presses the "Default" Button | 86 | * This slot is called when the user presses the "Default" Button |
86 | * You can reimplement it if needed. | 87 | * You can reimplement it if needed. |
87 | * | 88 | * |
88 | * @note Make sure you call the original implementation! | 89 | * @note Make sure you call the original implementation! |
89 | **/ | 90 | **/ |
90 | virtual void slotDefault(); | 91 | virtual void slotDefault(); |
91 | 92 | ||
92 | /** | 93 | /** |
93 | * This slot is called when the user presses the "Apply" Button | 94 | * This slot is called when the user presses the "Apply" Button |
94 | * You can reimplement it if needed | 95 | * You can reimplement it if needed |
95 | * | 96 | * |
96 | * @note Make sure you call the original implementation! | 97 | * @note Make sure you call the original implementation! |
97 | **/ | 98 | **/ |
98 | virtual void slotApply(); | 99 | virtual void slotApply(); |
99 | 100 | ||
100 | /** | 101 | /** |
101 | * This slot is called when the user presses the "OK" Button | 102 | * This slot is called when the user presses the "OK" Button |
102 | * You can reimplement it if needed | 103 | * You can reimplement it if needed |
103 | * | 104 | * |
104 | * @note Make sure you call the original implementation! | 105 | * @note Make sure you call the original implementation! |
105 | **/ | 106 | **/ |
106 | virtual void slotOk(); | 107 | virtual void slotOk(); |
107 | 108 | ||
108 | /** | 109 | /** |
109 | * This slot is called when the user presses the "Help" Button | 110 | * This slot is called when the user presses the "Help" Button |
110 | * You can reimplement it if needed | 111 | * You can reimplement it if needed |
111 | * | 112 | * |
112 | * @note Make sure you call the original implementation! | 113 | * @note Make sure you call the original implementation! |
113 | **/ | 114 | **/ |
114 | virtual void slotHelp(); | 115 | virtual void slotHelp(); |
115 | 116 | ||
116 | private slots: | 117 | private slots: |
117 | 118 | ||
118 | void slotAboutToShow(QWidget *); | 119 | void slotAboutToShow(QWidget *); |
119 | 120 | ||
120 | void clientChanged(bool state); | 121 | void clientChanged(bool state); |
121 | 122 | ||
122 | private: | 123 | private: |
123 | /*US | 124 | /*US |
124 | struct LoadInfo { | 125 | struct LoadInfo { |
125 | LoadInfo(const QString &_path, bool _withfallback) | 126 | LoadInfo(const QString &_path, bool _withfallback) |
126 | : path(_path), withfallback(_withfallback) | 127 | : path(_path), withfallback(_withfallback) |
127 | { } | 128 | { } |
128 | QString path; | 129 | QString path; |
129 | bool withfallback; | 130 | bool withfallback; |
130 | }; | 131 | }; |
131 | */ | 132 | */ |
132 | QPtrList<KCModule> modules; | 133 | QPtrList<KCModule> modules; |
133 | /* | 134 | /* |
134 | QPtrDict<LoadInfo> moduleDict; | 135 | QPtrDict<LoadInfo> moduleDict; |
135 | QString _docPath; | 136 | QString _docPath; |
136 | */ | 137 | */ |
137 | QString _baseGroup; | 138 | QString _baseGroup; |
138 | 139 | ||
139 | //US | 140 | //US |
140 | KJanusWidget* mMainWidget; | 141 | KJanusWidget* mMainWidget; |
141 | 142 | KPrefs* mPrefs; | |
143 | |||
142 | // For future use | 144 | // For future use |
143 | class KCMultiDialogPrivate; | 145 | class KCMultiDialogPrivate; |
144 | KCMultiDialogPrivate *d; | 146 | KCMultiDialogPrivate *d; |
145 | }; | 147 | }; |
146 | 148 | ||
147 | #endif //KCMULTIDIALOG_H | 149 | #endif //KCMULTIDIALOG_H |