summaryrefslogtreecommitdiff
path: root/scripts/kconfig/qconf.h
Side-by-side diff
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
@@ -1,36 +1,57 @@
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
*/
#include <qlistview.h>
-class ConfigLineEdit;
+class ConfigList;
class ConfigItem;
-class ConfigView;
+class ConfigLineEdit;
+class ConfigMainWindow;
+
+class ConfigView : public QVBox {
+ Q_OBJECT
+ typedef class QVBox Parent;
+public:
+ ConfigView(QWidget* parent, ConfigMainWindow* cview);
+ ~ConfigView(void);
+ static void updateList(ConfigItem* item);
+ static void updateListAll(void);
+
+public:
+ ConfigList* list;
+ ConfigLineEdit* lineEdit;
+
+ static ConfigView* viewList;
+ ConfigView* nextView;
+};
enum colIdx {
promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr
};
enum listMode {
singleMode, menuMode, symbolMode, fullMode
};
class ConfigList : public QListView {
Q_OBJECT
typedef class QListView Parent;
public:
- ConfigList(QWidget* p, ConfigView* cview);
+ ConfigList(ConfigView* p, ConfigMainWindow* cview);
void reinit(void);
+ ConfigView* parent(void) const
+ {
+ return (ConfigView*)Parent::parent();
+ }
- ConfigLineEdit* lineEdit;
protected:
- ConfigView* cview;
+ ConfigMainWindow* cview;
void keyPressEvent(QKeyEvent *e);
void contentsMousePressEvent(QMouseEvent *e);
void contentsMouseReleaseEvent(QMouseEvent *e);
void contentsMouseMoveEvent(QMouseEvent *e);
void contentsMouseDoubleClickEvent(QMouseEvent *e);
void focusInEvent(QFocusEvent *e);
public slots:
@@ -38,17 +59,16 @@ public slots:
void updateList(ConfigItem *item);
void setValue(ConfigItem* item, tristate val);
void changeValue(ConfigItem* item);
void updateSelection(void);
signals:
void menuSelected(struct menu *menu);
void parentSelected(void);
- void symbolChanged(ConfigItem* item);
void gotFocus(void);
public:
void updateListAll(void)
{
updateAll = true;
updateList(NULL);
updateAll = false;
@@ -95,32 +115,33 @@ public:
private:
int colMap[colNr];
int colRevMap[colNr];
};
class ConfigItem : public QListViewItem {
typedef class QListViewItem Parent;
public:
- ConfigItem(QListView *parent, ConfigItem *after, struct menu *m)
- : Parent(parent, after), menu(m)
+ ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
+ : Parent(parent, after), menu(m), visible(v)
{
init();
}
- ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m)
- : Parent(parent, after), menu(m)
+ ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
+ : Parent(parent, after), menu(m), visible(v)
{
init();
}
~ConfigItem(void);
void init(void);
#if QT_VERSION >= 300
void okRename(int col);
#endif
void updateMenu(void);
+ bool updateNeeded(void);
ConfigList* listView() const
{
return (ConfigList*)Parent::listView();
}
ConfigItem* firstChild() const
{
return (ConfigItem *)Parent::firstChild();
}
@@ -141,57 +162,61 @@ public:
Parent::setPixmap(listView()->mapIdx(idx), pm);
}
const QPixmap* pixmap(colIdx idx) const
{
return Parent::pixmap(listView()->mapIdx(idx));
}
void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
+ ConfigItem* nextItem;
struct menu *menu;
bool visible;
- bool doInit;
};
class ConfigLineEdit : public QLineEdit {
Q_OBJECT
typedef class QLineEdit Parent;
public:
- ConfigLineEdit(QWidget * parent)
- : QLineEdit(parent)
+ ConfigLineEdit(ConfigView* parent)
+ : Parent(parent)
{ }
+ ConfigView* parent(void) const
+ {
+ return (ConfigView*)Parent::parent();
+ }
void show(ConfigItem *i);
void keyPressEvent(QKeyEvent *e);
-signals:
- void lineChanged(ConfigItem *item);
public:
ConfigItem *item;
};
-class ConfigView : public QMainWindow {
+class ConfigMainWindow : public QMainWindow {
Q_OBJECT
public:
- ConfigView(void);
+ ConfigMainWindow(void);
public slots:
void setHelp(QListViewItem* item);
void changeMenu(struct menu *);
void listFocusChanged(void);
void goBack(void);
void loadConfig(void);
void saveConfig(void);
void saveConfigAs(void);
void showSingleView(void);
void showSplitView(void);
void showFullView(void);
void setShowAll(bool);
void setShowDebug(bool);
void setShowRange(bool);
void setShowName(bool);
void setShowData(bool);
+ void showIntro(void);
+ void showAbout(void);
protected:
void closeEvent(QCloseEvent *e);
ConfigList *menuList;
ConfigList *configList;
QTextView *helpText;
QToolBar *toolBar;