author | kergoth <kergoth> | 2003-01-16 18:04:11 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-01-16 18:04:11 (UTC) |
commit | 3904d85eac20dfd21cf2a3245977f9946865fd92 (patch) (unidiff) | |
tree | 8d5b2217c1b54a0c439815ec02db3f5235c99daa /scripts/kconfig/qconf.h | |
parent | 0eec393ef2dd8b43db96c86e80e307f73a771fae (diff) | |
download | opie-3904d85eac20dfd21cf2a3245977f9946865fd92.zip opie-3904d85eac20dfd21cf2a3245977f9946865fd92.tar.gz opie-3904d85eac20dfd21cf2a3245977f9946865fd92.tar.bz2 |
Update LinuxKernelConf to 1.3, latest available.
-rw-r--r-- | scripts/kconfig/qconf.h | 59 |
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 | |||
@@ -1,58 +1,78 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> | 2 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> |
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 | #include <qlistview.h> | 6 | #include <qlistview.h> |
7 | 7 | ||
8 | class ConfigLineEdit; | 8 | class ConfigList; |
9 | class ConfigItem; | 9 | class ConfigItem; |
10 | class ConfigView; | 10 | class ConfigLineEdit; |
11 | class ConfigMainWindow; | ||
12 | |||
13 | class ConfigView : public QVBox { | ||
14 | Q_OBJECT | ||
15 | typedef class QVBox Parent; | ||
16 | public: | ||
17 | ConfigView(QWidget* parent, ConfigMainWindow* cview); | ||
18 | ~ConfigView(void); | ||
19 | static void updateList(ConfigItem* item); | ||
20 | static void updateListAll(void); | ||
21 | |||
22 | public: | ||
23 | ConfigList* list; | ||
24 | ConfigLineEdit* lineEdit; | ||
25 | |||
26 | static ConfigView* viewList; | ||
27 | ConfigView* nextView; | ||
28 | }; | ||
11 | 29 | ||
12 | enum colIdx { | 30 | enum colIdx { |
13 | promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr | 31 | promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr |
14 | }; | 32 | }; |
15 | enum listMode { | 33 | enum listMode { |
16 | singleMode, menuMode, symbolMode, fullMode | 34 | singleMode, menuMode, symbolMode, fullMode |
17 | }; | 35 | }; |
18 | 36 | ||
19 | class ConfigList : public QListView { | 37 | class ConfigList : public QListView { |
20 | Q_OBJECT | 38 | Q_OBJECT |
21 | typedef class QListView Parent; | 39 | typedef class QListView Parent; |
22 | public: | 40 | public: |
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; | ||
27 | protected: | 48 | protected: |
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); |
32 | void contentsMouseReleaseEvent(QMouseEvent *e); | 53 | void contentsMouseReleaseEvent(QMouseEvent *e); |
33 | void contentsMouseMoveEvent(QMouseEvent *e); | 54 | void contentsMouseMoveEvent(QMouseEvent *e); |
34 | void contentsMouseDoubleClickEvent(QMouseEvent *e); | 55 | void contentsMouseDoubleClickEvent(QMouseEvent *e); |
35 | void focusInEvent(QFocusEvent *e); | 56 | void focusInEvent(QFocusEvent *e); |
36 | public slots: | 57 | public slots: |
37 | void setRootMenu(struct menu *menu); | 58 | void setRootMenu(struct menu *menu); |
38 | 59 | ||
39 | void updateList(ConfigItem *item); | 60 | void updateList(ConfigItem *item); |
40 | void setValue(ConfigItem* item, tristate val); | 61 | void setValue(ConfigItem* item, tristate val); |
41 | void changeValue(ConfigItem* item); | 62 | void changeValue(ConfigItem* item); |
42 | void updateSelection(void); | 63 | void updateSelection(void); |
43 | signals: | 64 | signals: |
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 | ||
49 | public: | 69 | public: |
50 | void updateListAll(void) | 70 | void updateListAll(void) |
51 | { | 71 | { |
52 | updateAll = true; | 72 | updateAll = true; |
53 | updateList(NULL); | 73 | updateList(NULL); |
54 | updateAll = false; | 74 | updateAll = false; |
55 | } | 75 | } |
56 | ConfigList* listView() | 76 | ConfigList* listView() |
57 | { | 77 | { |
58 | return this; | 78 | return this; |
@@ -91,40 +111,41 @@ public: | |||
91 | struct menu *rootEntry; | 111 | struct menu *rootEntry; |
92 | QColorGroup disabledColorGroup; | 112 | QColorGroup disabledColorGroup; |
93 | QColorGroup inactivedColorGroup; | 113 | QColorGroup inactivedColorGroup; |
94 | 114 | ||
95 | private: | 115 | private: |
96 | int colMap[colNr]; | 116 | int colMap[colNr]; |
97 | int colRevMap[colNr]; | 117 | int colRevMap[colNr]; |
98 | }; | 118 | }; |
99 | 119 | ||
100 | class ConfigItem : public QListViewItem { | 120 | class ConfigItem : public QListViewItem { |
101 | typedef class QListViewItem Parent; | 121 | typedef class QListViewItem Parent; |
102 | public: | 122 | public: |
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 | } |
113 | ~ConfigItem(void); | 133 | ~ConfigItem(void); |
114 | void init(void); | 134 | void init(void); |
115 | #if QT_VERSION >= 300 | 135 | #if QT_VERSION >= 300 |
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(); |
122 | } | 143 | } |
123 | ConfigItem* firstChild() const | 144 | ConfigItem* firstChild() const |
124 | { | 145 | { |
125 | return (ConfigItem *)Parent::firstChild(); | 146 | return (ConfigItem *)Parent::firstChild(); |
126 | } | 147 | } |
127 | ConfigItem* nextSibling() const | 148 | ConfigItem* nextSibling() const |
128 | { | 149 | { |
129 | return (ConfigItem *)Parent::nextSibling(); | 150 | return (ConfigItem *)Parent::nextSibling(); |
130 | } | 151 | } |
@@ -137,65 +158,69 @@ public: | |||
137 | return Parent::text(listView()->mapIdx(idx)); | 158 | return Parent::text(listView()->mapIdx(idx)); |
138 | } | 159 | } |
139 | void setPixmap(colIdx idx, const QPixmap& pm) | 160 | void setPixmap(colIdx idx, const QPixmap& pm) |
140 | { | 161 | { |
141 | Parent::setPixmap(listView()->mapIdx(idx), pm); | 162 | Parent::setPixmap(listView()->mapIdx(idx), pm); |
142 | } | 163 | } |
143 | const QPixmap* pixmap(colIdx idx) const | 164 | const QPixmap* pixmap(colIdx idx) const |
144 | { | 165 | { |
145 | return Parent::pixmap(listView()->mapIdx(idx)); | 166 | return Parent::pixmap(listView()->mapIdx(idx)); |
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 | ||
154 | class ConfigLineEdit : public QLineEdit { | 175 | class ConfigLineEdit : public QLineEdit { |
155 | Q_OBJECT | 176 | Q_OBJECT |
156 | typedef class QLineEdit Parent; | 177 | typedef class QLineEdit Parent; |
157 | public: | 178 | public: |
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); |
163 | signals: | ||
164 | void lineChanged(ConfigItem *item); | ||
165 | 188 | ||
166 | public: | 189 | public: |
167 | ConfigItem *item; | 190 | ConfigItem *item; |
168 | }; | 191 | }; |
169 | 192 | ||
170 | class ConfigView : public QMainWindow { | 193 | class ConfigMainWindow : public QMainWindow { |
171 | Q_OBJECT | 194 | Q_OBJECT |
172 | public: | 195 | public: |
173 | ConfigView(void); | 196 | ConfigMainWindow(void); |
174 | public slots: | 197 | public slots: |
175 | void setHelp(QListViewItem* item); | 198 | void setHelp(QListViewItem* item); |
176 | void changeMenu(struct menu *); | 199 | void changeMenu(struct menu *); |
177 | void listFocusChanged(void); | 200 | void listFocusChanged(void); |
178 | void goBack(void); | 201 | void goBack(void); |
179 | void loadConfig(void); | 202 | void loadConfig(void); |
180 | void saveConfig(void); | 203 | void saveConfig(void); |
181 | void saveConfigAs(void); | 204 | void saveConfigAs(void); |
182 | void showSingleView(void); | 205 | void showSingleView(void); |
183 | void showSplitView(void); | 206 | void showSplitView(void); |
184 | void showFullView(void); | 207 | void showFullView(void); |
185 | void setShowAll(bool); | 208 | void setShowAll(bool); |
186 | void setShowDebug(bool); | 209 | void setShowDebug(bool); |
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 | ||
191 | protected: | 216 | protected: |
192 | void closeEvent(QCloseEvent *e); | 217 | void closeEvent(QCloseEvent *e); |
193 | 218 | ||
194 | ConfigList *menuList; | 219 | ConfigList *menuList; |
195 | ConfigList *configList; | 220 | ConfigList *configList; |
196 | QTextView *helpText; | 221 | QTextView *helpText; |
197 | QToolBar *toolBar; | 222 | QToolBar *toolBar; |
198 | QAction *backAction; | 223 | QAction *backAction; |
199 | 224 | ||
200 | bool showDebug; | 225 | bool showDebug; |
201 | }; | 226 | }; |