summaryrefslogtreecommitdiff
path: root/scripts/kconfig/qconf.h
diff options
context:
space:
mode:
authorBoris Barbulovski <bbarbulovski@gmail.com>2015-09-22 11:36:17 -0700
committerMichal Marek <mmarek@suse.com>2015-10-14 14:59:02 +0200
commit1019f1a586afe835bf1c6e4e8acfcddd2b7465f6 (patch)
treef4a5629241ca018e221e4f995eff3c66903a076a /scripts/kconfig/qconf.h
parent92119937e844ef60693411062045d3c63ca8edd9 (diff)
Port xconfig to Qt5 - Introduce Qt4/5 version of ConfigList and ConfigItem
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.h')
-rw-r--r--scripts/kconfig/qconf.h48
1 files changed, 42 insertions, 6 deletions
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 1cd02192f172..54b3b925139a 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -17,6 +17,8 @@
#include "expr.h"
class ConfigView;
+class ConfigList;
+class ConfigItem;
class ConfigLineEdit;
class ConfigMainWindow;
@@ -37,6 +39,40 @@ enum optionMode {
normalOpt = 0, allOpt, promptOpt
};
+class ConfigList : public QTreeWidget {
+ Q_OBJECT
+ typedef class QTreeWidget Parent;
+public:
+ ConfigList(ConfigView* p, const char *name = 0);
+};
+
+class ConfigItem : public QTreeWidgetItem {
+ typedef class QTreeWidgetItem Parent;
+public:
+ ConfigItem(QTreeWidgetItem *parent, ConfigItem *after, struct menu *m, bool v)
+ : Parent(parent, after), menu(m), visible(v), goParent(false)
+ {
+ init();
+ }
+ ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
+ : Parent(parent, after), menu(m), visible(v), goParent(false)
+ {
+ init();
+ }
+ ConfigItem(QTreeWidgetItem *parent, ConfigItem *after, bool v)
+ : Parent(parent, after), menu(0), visible(v), goParent(true)
+ {
+ init();
+ }
+ ~ConfigItem(void);
+ void init(void);
+
+ ConfigItem* nextItem;
+ struct menu *menu;
+ bool visible;
+ bool goParent;
+};
+
class ConfigLineEdit : public QLineEdit {
Q_OBJECT
typedef class QLineEdit Parent;
@@ -46,11 +82,11 @@ public:
{
return (ConfigView*)Parent::parent();
}
- void show(QTreeWidgetItem *i);
+ void show(ConfigItem *i);
void keyPressEvent(QKeyEvent *e);
public:
- QTreeWidgetItem *item;
+ ConfigItem *item;
};
class ConfigView : public QWidget {
@@ -59,7 +95,7 @@ class ConfigView : public QWidget {
public:
ConfigView(QWidget* parent, const char *name = 0);
~ConfigView(void);
- static void updateList(QTreeWidgetItem* item);
+ static void updateList(ConfigItem* item);
static void updateListAll(void);
bool showName(void) const { return false; } // TODO: Implement me.
@@ -75,7 +111,7 @@ signals:
void showRangeChanged(bool);
void showDataChanged(bool);
public:
- QTreeWidget* list;
+ ConfigList* list;
ConfigLineEdit* lineEdit;
static ConfigView* viewList;
@@ -164,9 +200,9 @@ protected:
ConfigSearchWindow *searchWindow;
ConfigView *menuView;
- QTreeWidget *menuList;
+ ConfigList *menuList;
ConfigView *configView;
- QTreeWidget *configList;
+ ConfigList *configList;
ConfigInfoView *helpText;
QToolBar *toolBar;
QAction *backAction;