diff options
Diffstat (limited to 'scripts/kconfig/qconf.h')
-rw-r--r-- | scripts/kconfig/qconf.h | 76 |
1 files changed, 36 insertions, 40 deletions
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 636a74b23bf9..91677d900dbd 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h | |||
@@ -3,26 +3,25 @@ | |||
3 | * Released under the terms of the GNU GPL v2.0. | 3 | * Released under the terms of the GNU GPL v2.0. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #if QT_VERSION < 0x040000 | ||
6 | #include <qlistview.h> | 7 | #include <qlistview.h> |
7 | #if QT_VERSION >= 300 | ||
8 | #include <qsettings.h> | ||
9 | #else | 8 | #else |
10 | class QSettings { | 9 | #include <q3listview.h> |
11 | public: | 10 | #endif |
12 | void beginGroup(const QString& group) { } | 11 | #include <qsettings.h> |
13 | void endGroup(void) { } | 12 | |
14 | bool readBoolEntry(const QString& key, bool def = FALSE, bool* ok = 0) const | 13 | #if QT_VERSION < 0x040000 |
15 | { if (ok) *ok = FALSE; return def; } | 14 | #define Q3ValueList QValueList |
16 | int readNumEntry(const QString& key, int def = 0, bool* ok = 0) const | 15 | #define Q3PopupMenu QPopupMenu |
17 | { if (ok) *ok = FALSE; return def; } | 16 | #define Q3ListView QListView |
18 | QString readEntry(const QString& key, const QString& def = QString::null, bool* ok = 0) const | 17 | #define Q3ListViewItem QListViewItem |
19 | { if (ok) *ok = FALSE; return def; } | 18 | #define Q3VBox QVBox |
20 | QStringList readListEntry(const QString& key, bool* ok = 0) const | 19 | #define Q3TextBrowser QTextBrowser |
21 | { if (ok) *ok = FALSE; return QStringList(); } | 20 | #define Q3MainWindow QMainWindow |
22 | template <class t> | 21 | #define Q3Action QAction |
23 | bool writeEntry(const QString& key, t value) | 22 | #define Q3ToolBar QToolBar |
24 | { return TRUE; } | 23 | #define Q3ListViewItemIterator QListViewItemIterator |
25 | }; | 24 | #define Q3FileDialog QFileDialog |
26 | #endif | 25 | #endif |
27 | 26 | ||
28 | class ConfigView; | 27 | class ConfigView; |
@@ -31,11 +30,10 @@ class ConfigItem; | |||
31 | class ConfigLineEdit; | 30 | class ConfigLineEdit; |
32 | class ConfigMainWindow; | 31 | class ConfigMainWindow; |
33 | 32 | ||
34 | |||
35 | class ConfigSettings : public QSettings { | 33 | class ConfigSettings : public QSettings { |
36 | public: | 34 | public: |
37 | QValueList<int> readSizes(const QString& key, bool *ok); | 35 | Q3ValueList<int> readSizes(const QString& key, bool *ok); |
38 | bool writeSizes(const QString& key, const QValueList<int>& value); | 36 | bool writeSizes(const QString& key, const Q3ValueList<int>& value); |
39 | }; | 37 | }; |
40 | 38 | ||
41 | enum colIdx { | 39 | enum colIdx { |
@@ -48,9 +46,9 @@ enum optionMode { | |||
48 | normalOpt = 0, allOpt, promptOpt | 46 | normalOpt = 0, allOpt, promptOpt |
49 | }; | 47 | }; |
50 | 48 | ||
51 | class ConfigList : public QListView { | 49 | class ConfigList : public Q3ListView { |
52 | Q_OBJECT | 50 | Q_OBJECT |
53 | typedef class QListView Parent; | 51 | typedef class Q3ListView Parent; |
54 | public: | 52 | public: |
55 | ConfigList(ConfigView* p, const char *name = 0); | 53 | ConfigList(ConfigView* p, const char *name = 0); |
56 | void reinit(void); | 54 | void reinit(void); |
@@ -135,17 +133,17 @@ public: | |||
135 | struct menu *rootEntry; | 133 | struct menu *rootEntry; |
136 | QColorGroup disabledColorGroup; | 134 | QColorGroup disabledColorGroup; |
137 | QColorGroup inactivedColorGroup; | 135 | QColorGroup inactivedColorGroup; |
138 | QPopupMenu* headerPopup; | 136 | Q3PopupMenu* headerPopup; |
139 | 137 | ||
140 | private: | 138 | private: |
141 | int colMap[colNr]; | 139 | int colMap[colNr]; |
142 | int colRevMap[colNr]; | 140 | int colRevMap[colNr]; |
143 | }; | 141 | }; |
144 | 142 | ||
145 | class ConfigItem : public QListViewItem { | 143 | class ConfigItem : public Q3ListViewItem { |
146 | typedef class QListViewItem Parent; | 144 | typedef class Q3ListViewItem Parent; |
147 | public: | 145 | public: |
148 | ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v) | 146 | ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v) |
149 | : Parent(parent, after), menu(m), visible(v), goParent(false) | 147 | : Parent(parent, after), menu(m), visible(v), goParent(false) |
150 | { | 148 | { |
151 | init(); | 149 | init(); |
@@ -155,16 +153,14 @@ public: | |||
155 | { | 153 | { |
156 | init(); | 154 | init(); |
157 | } | 155 | } |
158 | ConfigItem(QListView *parent, ConfigItem *after, bool v) | 156 | ConfigItem(Q3ListView *parent, ConfigItem *after, bool v) |
159 | : Parent(parent, after), menu(0), visible(v), goParent(true) | 157 | : Parent(parent, after), menu(0), visible(v), goParent(true) |
160 | { | 158 | { |
161 | init(); | 159 | init(); |
162 | } | 160 | } |
163 | ~ConfigItem(void); | 161 | ~ConfigItem(void); |
164 | void init(void); | 162 | void init(void); |
165 | #if QT_VERSION >= 300 | ||
166 | void okRename(int col); | 163 | void okRename(int col); |
167 | #endif | ||
168 | void updateMenu(void); | 164 | void updateMenu(void); |
169 | void testUpdateMenu(bool v); | 165 | void testUpdateMenu(bool v); |
170 | ConfigList* listView() const | 166 | ConfigList* listView() const |
@@ -219,9 +215,9 @@ public: | |||
219 | ConfigItem *item; | 215 | ConfigItem *item; |
220 | }; | 216 | }; |
221 | 217 | ||
222 | class ConfigView : public QVBox { | 218 | class ConfigView : public Q3VBox { |
223 | Q_OBJECT | 219 | Q_OBJECT |
224 | typedef class QVBox Parent; | 220 | typedef class Q3VBox Parent; |
225 | public: | 221 | public: |
226 | ConfigView(QWidget* parent, const char *name = 0); | 222 | ConfigView(QWidget* parent, const char *name = 0); |
227 | ~ConfigView(void); | 223 | ~ConfigView(void); |
@@ -252,9 +248,9 @@ public: | |||
252 | static QAction *showPromptAction; | 248 | static QAction *showPromptAction; |
253 | }; | 249 | }; |
254 | 250 | ||
255 | class ConfigInfoView : public QTextBrowser { | 251 | class ConfigInfoView : public Q3TextBrowser { |
256 | Q_OBJECT | 252 | Q_OBJECT |
257 | typedef class QTextBrowser Parent; | 253 | typedef class Q3TextBrowser Parent; |
258 | public: | 254 | public: |
259 | ConfigInfoView(QWidget* parent, const char *name = 0); | 255 | ConfigInfoView(QWidget* parent, const char *name = 0); |
260 | bool showDebug(void) const { return _showDebug; } | 256 | bool showDebug(void) const { return _showDebug; } |
@@ -274,11 +270,11 @@ protected: | |||
274 | QString debug_info(struct symbol *sym); | 270 | QString debug_info(struct symbol *sym); |
275 | static QString print_filter(const QString &str); | 271 | static QString print_filter(const QString &str); |
276 | static void expr_print_help(void *data, struct symbol *sym, const char *str); | 272 | static void expr_print_help(void *data, struct symbol *sym, const char *str); |
277 | QPopupMenu* createPopupMenu(const QPoint& pos); | 273 | Q3PopupMenu* createPopupMenu(const QPoint& pos); |
278 | void contentsContextMenuEvent(QContextMenuEvent *e); | 274 | void contentsContextMenuEvent(QContextMenuEvent *e); |
279 | 275 | ||
280 | struct symbol *sym; | 276 | struct symbol *sym; |
281 | struct menu *menu; | 277 | struct menu *_menu; |
282 | bool _showDebug; | 278 | bool _showDebug; |
283 | }; | 279 | }; |
284 | 280 | ||
@@ -302,10 +298,10 @@ protected: | |||
302 | struct symbol **result; | 298 | struct symbol **result; |
303 | }; | 299 | }; |
304 | 300 | ||
305 | class ConfigMainWindow : public QMainWindow { | 301 | class ConfigMainWindow : public Q3MainWindow { |
306 | Q_OBJECT | 302 | Q_OBJECT |
307 | 303 | ||
308 | static QAction *saveAction; | 304 | static Q3Action *saveAction; |
309 | static void conf_changed(void); | 305 | static void conf_changed(void); |
310 | public: | 306 | public: |
311 | ConfigMainWindow(void); | 307 | ConfigMainWindow(void); |
@@ -334,8 +330,8 @@ protected: | |||
334 | ConfigView *configView; | 330 | ConfigView *configView; |
335 | ConfigList *configList; | 331 | ConfigList *configList; |
336 | ConfigInfoView *helpText; | 332 | ConfigInfoView *helpText; |
337 | QToolBar *toolBar; | 333 | Q3ToolBar *toolBar; |
338 | QAction *backAction; | 334 | Q3Action *backAction; |
339 | QSplitter* split1; | 335 | QSplitter* split1; |
340 | QSplitter* split2; | 336 | QSplitter* split2; |
341 | }; | 337 | }; |