diff options
author | Boris Barbulovski <bbarbulovski@gmail.com> | 2015-09-22 14:36:18 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2015-10-14 08:59:02 -0400 |
commit | 59e564408f88ee14395dd96f713eae2474edb591 (patch) | |
tree | a8c1b9c17f76f1280211bca31ac5a64ec40b581f /scripts/kconfig/qconf.cc | |
parent | 1019f1a586afe835bf1c6e4e8acfcddd2b7465f6 (diff) |
Port xconfig to Qt5 - Put back some of the old implementation.
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/kconfig/qconf.cc')
-rw-r--r-- | scripts/kconfig/qconf.cc | 121 |
1 files changed, 106 insertions, 15 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index a86409d6f6a6..0987a751d740 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc | |||
@@ -84,9 +84,31 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value) | |||
84 | for (it = value.begin(); it != value.end(); ++it) | 84 | for (it = value.begin(); it != value.end(); ++it) |
85 | stringList.push_back(QString::number(*it)); | 85 | stringList.push_back(QString::number(*it)); |
86 | setValue(key, stringList); | 86 | setValue(key, stringList); |
87 | |||
87 | return true; | 88 | return true; |
88 | } | 89 | } |
89 | 90 | ||
91 | |||
92 | /* | ||
93 | * set the new data | ||
94 | * TODO check the value | ||
95 | */ | ||
96 | void ConfigItem::okRename(int col) | ||
97 | { | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * update the displayed of a menu entry | ||
102 | */ | ||
103 | void ConfigItem::updateMenu(void) | ||
104 | { | ||
105 | } | ||
106 | |||
107 | void ConfigItem::testUpdateMenu(bool v) | ||
108 | { | ||
109 | } | ||
110 | |||
111 | |||
90 | /* | 112 | /* |
91 | * construct a menu entry | 113 | * construct a menu entry |
92 | */ | 114 | */ |
@@ -133,9 +155,92 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e) | |||
133 | } | 155 | } |
134 | 156 | ||
135 | ConfigList::ConfigList(ConfigView* p, const char *name) | 157 | ConfigList::ConfigList(ConfigView* p, const char *name) |
136 | : Parent(p) | 158 | : Parent(p), |
159 | updateAll(false), | ||
160 | symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), | ||
161 | choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), | ||
162 | menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), | ||
163 | showName(false), showRange(false), showData(false), optMode(normalOpt), | ||
164 | rootEntry(0), headerPopup(0) | ||
165 | { | ||
166 | } | ||
167 | |||
168 | void ConfigList::reinit(void) | ||
169 | { | ||
170 | } | ||
171 | |||
172 | void ConfigList::saveSettings(void) | ||
173 | { | ||
174 | } | ||
175 | |||
176 | ConfigItem* ConfigList::findConfigItem(struct menu *menu) | ||
177 | { | ||
178 | } | ||
179 | |||
180 | void ConfigList::updateSelection(void) | ||
181 | { | ||
182 | } | ||
183 | |||
184 | void ConfigList::updateList(ConfigItem* item) | ||
185 | { | ||
186 | } | ||
187 | |||
188 | void ConfigList::setValue(ConfigItem* item, tristate val) | ||
189 | { | ||
190 | } | ||
191 | |||
192 | void ConfigList::changeValue(ConfigItem* item) | ||
193 | { | ||
194 | } | ||
195 | |||
196 | void ConfigList::setRootMenu(struct menu *menu) | ||
197 | { | ||
198 | } | ||
199 | |||
200 | void ConfigList::setParentMenu(void) | ||
201 | { | ||
202 | } | ||
203 | |||
204 | /* | ||
205 | * update all the children of a menu entry | ||
206 | * removes/adds the entries from the parent widget as necessary | ||
207 | * | ||
208 | * parent: either the menu list widget or a menu entry widget | ||
209 | * menu: entry to be updated | ||
210 | */ | ||
211 | template <class P> | ||
212 | void ConfigList::updateMenuList(P* parent, struct menu* menu) | ||
213 | { | ||
214 | } | ||
215 | |||
216 | void ConfigList::keyPressEvent(QKeyEvent* ev) | ||
217 | { | ||
218 | } | ||
219 | |||
220 | void ConfigList::contentsMousePressEvent(QMouseEvent* e) | ||
137 | { | 221 | { |
138 | } | 222 | } |
223 | |||
224 | void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e) | ||
225 | { | ||
226 | } | ||
227 | |||
228 | void ConfigList::contentsMouseMoveEvent(QMouseEvent* e) | ||
229 | { | ||
230 | } | ||
231 | |||
232 | void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e) | ||
233 | { | ||
234 | } | ||
235 | |||
236 | void ConfigList::focusInEvent(QFocusEvent *e) | ||
237 | { | ||
238 | } | ||
239 | |||
240 | void ConfigList::contextMenuEvent(QContextMenuEvent *e) | ||
241 | { | ||
242 | } | ||
243 | |||
139 | ConfigView*ConfigView::viewList; | 244 | ConfigView*ConfigView::viewList; |
140 | QAction *ConfigView::showNormalAction; | 245 | QAction *ConfigView::showNormalAction; |
141 | QAction *ConfigView::showAllAction; | 246 | QAction *ConfigView::showAllAction; |
@@ -206,11 +311,6 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) | |||
206 | 311 | ||
207 | void ConfigInfoView::saveSettings(void) | 312 | void ConfigInfoView::saveSettings(void) |
208 | { | 313 | { |
209 | /*if (name()) { | ||
210 | configSettings->beginGroup(name()); | ||
211 | configSettings->setValue("/showDebug", showDebug()); | ||
212 | configSettings->endGroup(); | ||
213 | }*/ | ||
214 | } | 314 | } |
215 | 315 | ||
216 | void ConfigInfoView::setShowDebug(bool b) | 316 | void ConfigInfoView::setShowDebug(bool b) |
@@ -480,15 +580,6 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam | |||
480 | 580 | ||
481 | void ConfigSearchWindow::saveSettings(void) | 581 | void ConfigSearchWindow::saveSettings(void) |
482 | { | 582 | { |
483 | /*if (name()) { | ||
484 | configSettings->beginGroup(name()); | ||
485 | configSettings->setValue("/window x", pos().x()); | ||
486 | configSettings->setValue("/window y", pos().y()); | ||
487 | configSettings->setValue("/window width", size().width()); | ||
488 | configSettings->setValue("/window height", size().height()); | ||
489 | configSettings->writeSizes("/split", split->sizes()); | ||
490 | configSettings->endGroup(); | ||
491 | }*/ | ||
492 | } | 583 | } |
493 | 584 | ||
494 | void ConfigSearchWindow::search(void) | 585 | void ConfigSearchWindow::search(void) |