diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-06-09 01:12:45 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-06-09 01:31:31 -0400 |
commit | 43bf612af2d4f2615dcbf86af8206e2f40231237 (patch) | |
tree | 416d6a9384813049784dc5090e79da532fd3c86d /scripts/kconfig/qconf.h | |
parent | face4374e288372fba67c865eb0c92337f50d5a4 (diff) |
kconfig: Add search option for xconfig
Implement a simple search request for xconfig. Currently the capabilities are
rather simple (the same as menuconfig).
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/qconf.h')
-rw-r--r-- | scripts/kconfig/qconf.h | 61 |
1 files changed, 49 insertions, 12 deletions
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index e52f3e90bf0c..a548d13149b3 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h | |||
@@ -36,7 +36,7 @@ class ConfigView : public QVBox { | |||
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | typedef class QVBox Parent; | 37 | typedef class QVBox Parent; |
38 | public: | 38 | public: |
39 | ConfigView(QWidget* parent, ConfigMainWindow* cview, ConfigSettings* configSettings); | 39 | ConfigView(QWidget* parent, ConfigSettings* configSettings); |
40 | ~ConfigView(void); | 40 | ~ConfigView(void); |
41 | static void updateList(ConfigItem* item); | 41 | static void updateList(ConfigItem* item); |
42 | static void updateListAll(void); | 42 | static void updateListAll(void); |
@@ -53,14 +53,14 @@ enum colIdx { | |||
53 | promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr | 53 | promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr |
54 | }; | 54 | }; |
55 | enum listMode { | 55 | enum listMode { |
56 | singleMode, menuMode, symbolMode, fullMode | 56 | singleMode, menuMode, symbolMode, fullMode, listMode |
57 | }; | 57 | }; |
58 | 58 | ||
59 | class ConfigList : public QListView { | 59 | class ConfigList : public QListView { |
60 | Q_OBJECT | 60 | Q_OBJECT |
61 | typedef class QListView Parent; | 61 | typedef class QListView Parent; |
62 | public: | 62 | public: |
63 | ConfigList(ConfigView* p, ConfigMainWindow* cview, ConfigSettings *configSettings); | 63 | ConfigList(ConfigView* p, ConfigSettings *configSettings); |
64 | void reinit(void); | 64 | void reinit(void); |
65 | ConfigView* parent(void) const | 65 | ConfigView* parent(void) const |
66 | { | 66 | { |
@@ -68,8 +68,6 @@ public: | |||
68 | } | 68 | } |
69 | 69 | ||
70 | protected: | 70 | protected: |
71 | ConfigMainWindow* cview; | ||
72 | |||
73 | void keyPressEvent(QKeyEvent *e); | 71 | void keyPressEvent(QKeyEvent *e); |
74 | void contentsMousePressEvent(QMouseEvent *e); | 72 | void contentsMousePressEvent(QMouseEvent *e); |
75 | void contentsMouseReleaseEvent(QMouseEvent *e); | 73 | void contentsMouseReleaseEvent(QMouseEvent *e); |
@@ -84,6 +82,7 @@ public slots: | |||
84 | void changeValue(ConfigItem* item); | 82 | void changeValue(ConfigItem* item); |
85 | void updateSelection(void); | 83 | void updateSelection(void); |
86 | signals: | 84 | signals: |
85 | void menuChanged(struct menu *menu); | ||
87 | void menuSelected(struct menu *menu); | 86 | void menuSelected(struct menu *menu); |
88 | void parentSelected(void); | 87 | void parentSelected(void); |
89 | void gotFocus(void); | 88 | void gotFocus(void); |
@@ -208,9 +207,7 @@ class ConfigLineEdit : public QLineEdit { | |||
208 | Q_OBJECT | 207 | Q_OBJECT |
209 | typedef class QLineEdit Parent; | 208 | typedef class QLineEdit Parent; |
210 | public: | 209 | public: |
211 | ConfigLineEdit(ConfigView* parent) | 210 | ConfigLineEdit(ConfigView* parent); |
212 | : Parent(parent) | ||
213 | { } | ||
214 | ConfigView* parent(void) const | 211 | ConfigView* parent(void) const |
215 | { | 212 | { |
216 | return (ConfigView*)Parent::parent(); | 213 | return (ConfigView*)Parent::parent(); |
@@ -222,6 +219,47 @@ public: | |||
222 | ConfigItem *item; | 219 | ConfigItem *item; |
223 | }; | 220 | }; |
224 | 221 | ||
222 | class ConfigInfoView : public QTextBrowser { | ||
223 | Q_OBJECT | ||
224 | typedef class QTextBrowser Parent; | ||
225 | public: | ||
226 | ConfigInfoView(QWidget* parent, const char *name = 0); | ||
227 | bool showDebug(void) const { return _showDebug; } | ||
228 | |||
229 | public slots: | ||
230 | void setInfo(struct menu *menu); | ||
231 | void setSource(const QString& name); | ||
232 | void setShowDebug(bool); | ||
233 | |||
234 | signals: | ||
235 | void showDebugChanged(bool); | ||
236 | |||
237 | protected: | ||
238 | void menuInfo(void); | ||
239 | QString debug_info(struct symbol *sym); | ||
240 | static QString print_filter(const QString &str); | ||
241 | static void expr_print_help(void *data, const char *str); | ||
242 | |||
243 | struct menu *menu; | ||
244 | bool _showDebug; | ||
245 | }; | ||
246 | |||
247 | class ConfigSearchWindow : public QDialog { | ||
248 | Q_OBJECT | ||
249 | typedef class QDialog Parent; | ||
250 | public: | ||
251 | ConfigSearchWindow(QWidget* parent); | ||
252 | public slots: | ||
253 | void search(void); | ||
254 | protected: | ||
255 | QLineEdit* editField; | ||
256 | QPushButton* searchButton; | ||
257 | ConfigView* list; | ||
258 | ConfigInfoView* info; | ||
259 | |||
260 | struct symbol **result; | ||
261 | }; | ||
262 | |||
225 | class ConfigMainWindow : public QMainWindow { | 263 | class ConfigMainWindow : public QMainWindow { |
226 | Q_OBJECT | 264 | Q_OBJECT |
227 | public: | 265 | public: |
@@ -234,11 +272,11 @@ public slots: | |||
234 | void loadConfig(void); | 272 | void loadConfig(void); |
235 | void saveConfig(void); | 273 | void saveConfig(void); |
236 | void saveConfigAs(void); | 274 | void saveConfigAs(void); |
275 | void searchConfig(void); | ||
237 | void showSingleView(void); | 276 | void showSingleView(void); |
238 | void showSplitView(void); | 277 | void showSplitView(void); |
239 | void showFullView(void); | 278 | void showFullView(void); |
240 | void setShowAll(bool); | 279 | void setShowAll(bool); |
241 | void setShowDebug(bool); | ||
242 | void setShowRange(bool); | 280 | void setShowRange(bool); |
243 | void setShowName(bool); | 281 | void setShowName(bool); |
244 | void setShowData(bool); | 282 | void setShowData(bool); |
@@ -249,15 +287,14 @@ public slots: | |||
249 | protected: | 287 | protected: |
250 | void closeEvent(QCloseEvent *e); | 288 | void closeEvent(QCloseEvent *e); |
251 | 289 | ||
290 | ConfigSearchWindow *searchWindow; | ||
252 | ConfigView *menuView; | 291 | ConfigView *menuView; |
253 | ConfigList *menuList; | 292 | ConfigList *menuList; |
254 | ConfigView *configView; | 293 | ConfigView *configView; |
255 | ConfigList *configList; | 294 | ConfigList *configList; |
256 | QTextView *helpText; | 295 | ConfigInfoView *helpText; |
257 | QToolBar *toolBar; | 296 | QToolBar *toolBar; |
258 | QAction *backAction; | 297 | QAction *backAction; |
259 | QSplitter* split1; | 298 | QSplitter* split1; |
260 | QSplitter* split2; | 299 | QSplitter* split2; |
261 | |||
262 | bool showDebug; | ||
263 | }; | 300 | }; |