-rw-r--r-- | scripts/kconfig/qconf.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 6f096b4..c548884 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -88,68 +88,77 @@ public: void addColumn(colIdx idx, const QString& label) { colMap[idx] = Parent::addColumn(label); colRevMap[colMap[idx]] = idx; } void removeColumn(colIdx idx) { int col = colMap[idx]; if (col >= 0) { Parent::removeColumn(col); colRevMap[col] = colMap[idx] = -1; } } void setAllOpen(bool open); void setParentMenu(void); + template <class P> + void ConfigList::updateMenuList(P*, struct menu*); + bool updateAll; QPixmap symbolYesPix, symbolModPix, symbolNoPix; - QPixmap choiceYesPix, choiceNoPix, menuPix, menuInvPix; + QPixmap choiceYesPix, choiceNoPix; + QPixmap menuPix, menuInvPix, menuBackPix, voidPix; bool showAll, showName, showRange, showData; enum listMode mode; struct menu *rootEntry; QColorGroup disabledColorGroup; QColorGroup inactivedColorGroup; private: int colMap[colNr]; int colRevMap[colNr]; }; class ConfigItem : public QListViewItem { typedef class QListViewItem Parent; public: ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v) - : Parent(parent, after), menu(m), visible(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) + : Parent(parent, after), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(QListView *parent, ConfigItem *after, bool v) + : Parent(parent, after), menu(0), visible(v), goParent(true) { init(); } ~ConfigItem(void); void init(void); #if QT_VERSION >= 300 void okRename(int col); #endif void updateMenu(void); - bool updateNeeded(void); + void testUpdateMenu(bool v); ConfigList* listView() const { return (ConfigList*)Parent::listView(); } ConfigItem* firstChild() const { return (ConfigItem *)Parent::firstChild(); } ConfigItem* nextSibling() const { return (ConfigItem *)Parent::nextSibling(); } void setText(colIdx idx, const QString& text) { Parent::setText(listView()->mapIdx(idx), text); } @@ -157,32 +166,33 @@ public: { return Parent::text(listView()->mapIdx(idx)); } void setPixmap(colIdx idx, const QPixmap& pm) { 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 goParent; }; class ConfigLineEdit : public QLineEdit { Q_OBJECT typedef class QLineEdit Parent; public: ConfigLineEdit(ConfigView* parent) : Parent(parent) { } ConfigView* parent(void) const { return (ConfigView*)Parent::parent(); } void show(ConfigItem *i); void keyPressEvent(QKeyEvent *e); @@ -203,24 +213,26 @@ public slots: 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); + ConfigView *menuView; ConfigList *menuList; + ConfigView *configView; ConfigList *configList; QTextView *helpText; QToolBar *toolBar; QAction *backAction; bool showDebug; }; |