summaryrefslogtreecommitdiff
path: root/scripts/kconfig/qconf.h
Unidiff
Diffstat (limited to 'scripts/kconfig/qconf.h') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/kconfig/qconf.h59
1 files changed, 42 insertions, 17 deletions
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index f8f3669..6f096b4 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -5,9 +5,27 @@
5 5
6#include <qlistview.h> 6#include <qlistview.h>
7 7
8class ConfigLineEdit; 8class ConfigList;
9class ConfigItem; 9class ConfigItem;
10class ConfigView; 10class ConfigLineEdit;
11class ConfigMainWindow;
12
13class ConfigView : public QVBox {
14 Q_OBJECT
15 typedef class QVBox Parent;
16public:
17 ConfigView(QWidget* parent, ConfigMainWindow* cview);
18 ~ConfigView(void);
19 static void updateList(ConfigItem* item);
20 static void updateListAll(void);
21
22public:
23 ConfigList* list;
24 ConfigLineEdit* lineEdit;
25
26 static ConfigView* viewList;
27 ConfigView* nextView;
28};
11 29
12enum colIdx { 30enum colIdx {
13 promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr 31 promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr
@@ -20,12 +38,15 @@ class ConfigList : public QListView {
20 Q_OBJECT 38 Q_OBJECT
21 typedef class QListView Parent; 39 typedef class QListView Parent;
22public: 40public:
23 ConfigList(QWidget* p, ConfigView* cview); 41 ConfigList(ConfigView* p, ConfigMainWindow* cview);
24 void reinit(void); 42 void reinit(void);
43 ConfigView* parent(void) const
44 {
45 return (ConfigView*)Parent::parent();
46 }
25 47
26 ConfigLineEdit* lineEdit;
27protected: 48protected:
28 ConfigView* cview; 49 ConfigMainWindow* cview;
29 50
30 void keyPressEvent(QKeyEvent *e); 51 void keyPressEvent(QKeyEvent *e);
31 void contentsMousePressEvent(QMouseEvent *e); 52 void contentsMousePressEvent(QMouseEvent *e);
@@ -43,7 +64,6 @@ public slots:
43signals: 64signals:
44 void menuSelected(struct menu *menu); 65 void menuSelected(struct menu *menu);
45 void parentSelected(void); 66 void parentSelected(void);
46 void symbolChanged(ConfigItem* item);
47 void gotFocus(void); 67 void gotFocus(void);
48 68
49public: 69public:
@@ -100,13 +120,13 @@ private:
100class ConfigItem : public QListViewItem { 120class ConfigItem : public QListViewItem {
101 typedef class QListViewItem Parent; 121 typedef class QListViewItem Parent;
102public: 122public:
103 ConfigItem(QListView *parent, ConfigItem *after, struct menu *m) 123 ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
104 : Parent(parent, after), menu(m) 124 : Parent(parent, after), menu(m), visible(v)
105 { 125 {
106 init(); 126 init();
107 } 127 }
108 ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m) 128 ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
109 : Parent(parent, after), menu(m) 129 : Parent(parent, after), menu(m), visible(v)
110 { 130 {
111 init(); 131 init();
112 } 132 }
@@ -116,6 +136,7 @@ public:
116 void okRename(int col); 136 void okRename(int col);
117#endif 137#endif
118 void updateMenu(void); 138 void updateMenu(void);
139 bool updateNeeded(void);
119 ConfigList* listView() const 140 ConfigList* listView() const
120 { 141 {
121 return (ConfigList*)Parent::listView(); 142 return (ConfigList*)Parent::listView();
@@ -146,31 +167,33 @@ public:
146 } 167 }
147 void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); 168 void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
148 169
170 ConfigItem* nextItem;
149 struct menu *menu; 171 struct menu *menu;
150 bool visible; 172 bool visible;
151 bool doInit;
152}; 173};
153 174
154class ConfigLineEdit : public QLineEdit { 175class ConfigLineEdit : public QLineEdit {
155 Q_OBJECT 176 Q_OBJECT
156 typedef class QLineEdit Parent; 177 typedef class QLineEdit Parent;
157public: 178public:
158 ConfigLineEdit(QWidget * parent) 179 ConfigLineEdit(ConfigView* parent)
159 : QLineEdit(parent) 180 : Parent(parent)
160 { } 181 { }
182 ConfigView* parent(void) const
183 {
184 return (ConfigView*)Parent::parent();
185 }
161 void show(ConfigItem *i); 186 void show(ConfigItem *i);
162 void keyPressEvent(QKeyEvent *e); 187 void keyPressEvent(QKeyEvent *e);
163signals:
164 void lineChanged(ConfigItem *item);
165 188
166public: 189public:
167 ConfigItem *item; 190 ConfigItem *item;
168}; 191};
169 192
170class ConfigView : public QMainWindow { 193class ConfigMainWindow : public QMainWindow {
171 Q_OBJECT 194 Q_OBJECT
172public: 195public:
173 ConfigView(void); 196 ConfigMainWindow(void);
174public slots: 197public slots:
175 void setHelp(QListViewItem* item); 198 void setHelp(QListViewItem* item);
176 void changeMenu(struct menu *); 199 void changeMenu(struct menu *);
@@ -187,6 +210,8 @@ public slots:
187 void setShowRange(bool); 210 void setShowRange(bool);
188 void setShowName(bool); 211 void setShowName(bool);
189 void setShowData(bool); 212 void setShowData(bool);
213 void showIntro(void);
214 void showAbout(void);
190 215
191protected: 216protected:
192 void closeEvent(QCloseEvent *e); 217 void closeEvent(QCloseEvent *e);