Masahiro Yamada | 0c87410 | 2018-12-18 21:13:35 +0900 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
Boris Barbulovski | 68ccb7e | 2015-09-22 11:36:15 -0700 | [diff] [blame] | 6 | #include <QCheckBox> |
| 7 | #include <QDialog> |
Mauro Carvalho Chehab | cf81dfa | 2020-06-30 08:26:35 +0200 | [diff] [blame] | 8 | #include <QHeaderView> |
| 9 | #include <QLineEdit> |
| 10 | #include <QMainWindow> |
| 11 | #include <QPushButton> |
| 12 | #include <QSettings> |
| 13 | #include <QSplitter> |
| 14 | #include <QTextBrowser> |
| 15 | #include <QTreeWidget> |
| 16 | |
Boris Barbulovski | 68ccb7e | 2015-09-22 11:36:15 -0700 | [diff] [blame] | 17 | #include "expr.h" |
Alexander Stein | 133c5f7 | 2010-08-31 17:34:37 +0200 | [diff] [blame] | 18 | |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 19 | class ConfigView; |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 20 | class ConfigList; |
| 21 | class ConfigItem; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | class ConfigLineEdit; |
| 23 | class ConfigMainWindow; |
| 24 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | class ConfigSettings : public QSettings { |
| 26 | public: |
Ben Hutchings | 00d4f8f | 2013-10-06 19:21:31 +0100 | [diff] [blame] | 27 | ConfigSettings(); |
Boris Barbulovski | 041fbdc | 2015-09-22 11:36:05 -0700 | [diff] [blame] | 28 | QList<int> readSizes(const QString& key, bool *ok); |
| 29 | bool writeSizes(const QString& key, const QList<int>& value); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | enum colIdx { |
| 33 | promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr |
| 34 | }; |
| 35 | enum listMode { |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 36 | singleMode, menuMode, symbolMode, fullMode, listMode |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | }; |
Li Zefan | 39a4897 | 2010-05-10 16:33:41 +0800 | [diff] [blame] | 38 | enum optionMode { |
| 39 | normalOpt = 0, allOpt, promptOpt |
| 40 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 42 | class ConfigList : public QTreeWidget { |
| 43 | Q_OBJECT |
| 44 | typedef class QTreeWidget Parent; |
| 45 | public: |
| 46 | ConfigList(ConfigView* p, const char *name = 0); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 47 | void reinit(void); |
| 48 | ConfigView* parent(void) const |
| 49 | { |
| 50 | return (ConfigView*)Parent::parent(); |
| 51 | } |
| 52 | ConfigItem* findConfigItem(struct menu *); |
| 53 | |
| 54 | protected: |
| 55 | void keyPressEvent(QKeyEvent *e); |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 56 | void mousePressEvent(QMouseEvent *e); |
| 57 | void mouseReleaseEvent(QMouseEvent *e); |
| 58 | void mouseMoveEvent(QMouseEvent *e); |
| 59 | void mouseDoubleClickEvent(QMouseEvent *e); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 60 | void focusInEvent(QFocusEvent *e); |
| 61 | void contextMenuEvent(QContextMenuEvent *e); |
| 62 | |
| 63 | public slots: |
| 64 | void setRootMenu(struct menu *menu); |
| 65 | |
| 66 | void updateList(ConfigItem *item); |
| 67 | void setValue(ConfigItem* item, tristate val); |
| 68 | void changeValue(ConfigItem* item); |
| 69 | void updateSelection(void); |
| 70 | void saveSettings(void); |
| 71 | signals: |
| 72 | void menuChanged(struct menu *menu); |
| 73 | void menuSelected(struct menu *menu); |
Mauro Carvalho Chehab | b311142 | 2020-04-02 11:28:01 +0200 | [diff] [blame] | 74 | void itemSelected(struct menu *menu); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 75 | void parentSelected(void); |
| 76 | void gotFocus(struct menu *); |
| 77 | |
| 78 | public: |
| 79 | void updateListAll(void) |
| 80 | { |
| 81 | updateAll = true; |
| 82 | updateList(NULL); |
| 83 | updateAll = false; |
| 84 | } |
| 85 | ConfigList* listView() |
| 86 | { |
| 87 | return this; |
| 88 | } |
| 89 | ConfigItem* firstChild() const |
| 90 | { |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 91 | return (ConfigItem *)children().first(); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 92 | } |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 93 | void addColumn(colIdx idx) |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 94 | { |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 95 | showColumn(idx); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 96 | } |
| 97 | void removeColumn(colIdx idx) |
| 98 | { |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 99 | hideColumn(idx); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 100 | } |
| 101 | void setAllOpen(bool open); |
| 102 | void setParentMenu(void); |
| 103 | |
| 104 | bool menuSkip(struct menu *); |
| 105 | |
Boris Barbulovski | 5c6f155 | 2015-09-22 11:36:27 -0700 | [diff] [blame] | 106 | void updateMenuList(ConfigItem *parent, struct menu*); |
| 107 | void updateMenuList(ConfigList *parent, struct menu*); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 108 | |
| 109 | bool updateAll; |
| 110 | |
| 111 | QPixmap symbolYesPix, symbolModPix, symbolNoPix; |
| 112 | QPixmap choiceYesPix, choiceNoPix; |
| 113 | QPixmap menuPix, menuInvPix, menuBackPix, voidPix; |
| 114 | |
| 115 | bool showName, showRange, showData; |
| 116 | enum listMode mode; |
| 117 | enum optionMode optMode; |
| 118 | struct menu *rootEntry; |
| 119 | QPalette disabledColorGroup; |
| 120 | QPalette inactivedColorGroup; |
| 121 | QMenu* headerPopup; |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | class ConfigItem : public QTreeWidgetItem { |
| 125 | typedef class QTreeWidgetItem Parent; |
| 126 | public: |
Boris Barbulovski | d960b98 | 2015-09-22 11:36:30 -0700 | [diff] [blame] | 127 | ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v) |
Boris Barbulovski | 86c0528 | 2015-09-22 11:36:25 -0700 | [diff] [blame] | 128 | : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 129 | { |
| 130 | init(); |
| 131 | } |
| 132 | ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) |
Boris Barbulovski | 86c0528 | 2015-09-22 11:36:25 -0700 | [diff] [blame] | 133 | : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 134 | { |
| 135 | init(); |
| 136 | } |
Boris Barbulovski | d960b98 | 2015-09-22 11:36:30 -0700 | [diff] [blame] | 137 | ConfigItem(ConfigList *parent, ConfigItem *after, bool v) |
Boris Barbulovski | 86c0528 | 2015-09-22 11:36:25 -0700 | [diff] [blame] | 138 | : Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true) |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 139 | { |
| 140 | init(); |
| 141 | } |
| 142 | ~ConfigItem(void); |
| 143 | void init(void); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 144 | void okRename(int col); |
| 145 | void updateMenu(void); |
| 146 | void testUpdateMenu(bool v); |
| 147 | ConfigList* listView() const |
| 148 | { |
| 149 | return (ConfigList*)Parent::treeWidget(); |
| 150 | } |
| 151 | ConfigItem* firstChild() const |
| 152 | { |
| 153 | return (ConfigItem *)Parent::child(0); |
| 154 | } |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 155 | ConfigItem* nextSibling() |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 156 | { |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 157 | ConfigItem *ret = NULL; |
| 158 | ConfigItem *_parent = (ConfigItem *)parent(); |
| 159 | |
| 160 | if(_parent) { |
Boris Barbulovski | b3c48f9 | 2015-09-22 11:36:32 -0700 | [diff] [blame] | 161 | ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1); |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 162 | } else { |
Boris Barbulovski | b3c48f9 | 2015-09-22 11:36:32 -0700 | [diff] [blame] | 163 | QTreeWidget *_treeWidget = treeWidget(); |
| 164 | ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1); |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 165 | } |
| 166 | |
| 167 | return ret; |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 168 | } |
| 169 | void setText(colIdx idx, const QString& text) |
| 170 | { |
| 171 | Parent::setText(idx, text); |
| 172 | } |
| 173 | QString text(colIdx idx) const |
| 174 | { |
| 175 | return Parent::text(idx); |
| 176 | } |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 177 | void setPixmap(colIdx idx, const QIcon &icon) |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 178 | { |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 179 | Parent::setIcon(idx, icon); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 180 | } |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 181 | const QIcon pixmap(colIdx idx) const |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 182 | { |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 183 | return icon(idx); |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 184 | } |
Boris Barbulovski | d5d973c | 2015-09-22 11:36:19 -0700 | [diff] [blame] | 185 | // TODO: Implement paintCell |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 186 | |
| 187 | ConfigItem* nextItem; |
| 188 | struct menu *menu; |
| 189 | bool visible; |
| 190 | bool goParent; |
| 191 | }; |
| 192 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | class ConfigLineEdit : public QLineEdit { |
| 194 | Q_OBJECT |
| 195 | typedef class QLineEdit Parent; |
| 196 | public: |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 197 | ConfigLineEdit(ConfigView* parent); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | ConfigView* parent(void) const |
| 199 | { |
| 200 | return (ConfigView*)Parent::parent(); |
| 201 | } |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 202 | void show(ConfigItem *i); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | void keyPressEvent(QKeyEvent *e); |
| 204 | |
| 205 | public: |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 206 | ConfigItem *item; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 207 | }; |
| 208 | |
Boris Barbulovski | 34d6320 | 2015-09-22 11:36:09 -0700 | [diff] [blame] | 209 | class ConfigView : public QWidget { |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 210 | Q_OBJECT |
Boris Barbulovski | 34d6320 | 2015-09-22 11:36:09 -0700 | [diff] [blame] | 211 | typedef class QWidget Parent; |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 212 | public: |
| 213 | ConfigView(QWidget* parent, const char *name = 0); |
| 214 | ~ConfigView(void); |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 215 | static void updateList(ConfigItem* item); |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 216 | static void updateListAll(void); |
| 217 | |
Boris Barbulovski | 59e5644 | 2015-09-22 11:36:18 -0700 | [diff] [blame] | 218 | bool showName(void) const { return list->showName; } |
| 219 | bool showRange(void) const { return list->showRange; } |
| 220 | bool showData(void) const { return list->showData; } |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 221 | public slots: |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 222 | void setShowName(bool); |
| 223 | void setShowRange(bool); |
| 224 | void setShowData(bool); |
Li Zefan | 39a4897 | 2010-05-10 16:33:41 +0800 | [diff] [blame] | 225 | void setOptionMode(QAction *); |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 226 | signals: |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 227 | void showNameChanged(bool); |
| 228 | void showRangeChanged(bool); |
| 229 | void showDataChanged(bool); |
| 230 | public: |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 231 | ConfigList* list; |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 232 | ConfigLineEdit* lineEdit; |
| 233 | |
| 234 | static ConfigView* viewList; |
| 235 | ConfigView* nextView; |
Li Zefan | 39a4897 | 2010-05-10 16:33:41 +0800 | [diff] [blame] | 236 | |
| 237 | static QAction *showNormalAction; |
| 238 | static QAction *showAllAction; |
| 239 | static QAction *showPromptAction; |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 240 | }; |
| 241 | |
Boris Barbulovski | 924bbb5 | 2015-09-22 11:36:06 -0700 | [diff] [blame] | 242 | class ConfigInfoView : public QTextBrowser { |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 243 | Q_OBJECT |
Boris Barbulovski | 924bbb5 | 2015-09-22 11:36:06 -0700 | [diff] [blame] | 244 | typedef class QTextBrowser Parent; |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 245 | public: |
| 246 | ConfigInfoView(QWidget* parent, const char *name = 0); |
| 247 | bool showDebug(void) const { return _showDebug; } |
| 248 | |
| 249 | public slots: |
| 250 | void setInfo(struct menu *menu); |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 251 | void saveSettings(void); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 252 | void setShowDebug(bool); |
Mauro Carvalho Chehab | c4f7398 | 2020-06-30 08:26:37 +0200 | [diff] [blame^] | 253 | void clicked (const QUrl &url); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 254 | |
| 255 | signals: |
| 256 | void showDebugChanged(bool); |
Roman Zippel | b65a47e | 2006-06-08 22:12:47 -0700 | [diff] [blame] | 257 | void menuSelected(struct menu *); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 258 | |
| 259 | protected: |
Roman Zippel | ab45d19 | 2006-06-08 22:12:47 -0700 | [diff] [blame] | 260 | void symbolInfo(void); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 261 | void menuInfo(void); |
| 262 | QString debug_info(struct symbol *sym); |
| 263 | static QString print_filter(const QString &str); |
Roman Zippel | ab45d19 | 2006-06-08 22:12:47 -0700 | [diff] [blame] | 264 | static void expr_print_help(void *data, struct symbol *sym, const char *str); |
Boris Barbulovski | 924bbb5 | 2015-09-22 11:36:06 -0700 | [diff] [blame] | 265 | QMenu *createStandardContextMenu(const QPoint & pos); |
| 266 | void contextMenuEvent(QContextMenuEvent *e); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 267 | |
Roman Zippel | ab45d19 | 2006-06-08 22:12:47 -0700 | [diff] [blame] | 268 | struct symbol *sym; |
Alexander Stein | 133c5f7 | 2010-08-31 17:34:37 +0200 | [diff] [blame] | 269 | struct menu *_menu; |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 270 | bool _showDebug; |
| 271 | }; |
| 272 | |
| 273 | class ConfigSearchWindow : public QDialog { |
| 274 | Q_OBJECT |
| 275 | typedef class QDialog Parent; |
| 276 | public: |
Marco Costalba | 63431e7 | 2006-10-05 19:12:59 +0200 | [diff] [blame] | 277 | ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 278 | |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 279 | public slots: |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 280 | void saveSettings(void); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 281 | void search(void); |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 282 | |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 283 | protected: |
| 284 | QLineEdit* editField; |
| 285 | QPushButton* searchButton; |
Roman Zippel | 7fc925f | 2006-06-08 22:12:46 -0700 | [diff] [blame] | 286 | QSplitter* split; |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 287 | ConfigView* list; |
| 288 | ConfigInfoView* info; |
| 289 | |
| 290 | struct symbol **result; |
| 291 | }; |
| 292 | |
Boris Barbulovski | b1f8a45 | 2015-09-22 11:36:02 -0700 | [diff] [blame] | 293 | class ConfigMainWindow : public QMainWindow { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 294 | Q_OBJECT |
Karsten Wiese | 3b354c5 | 2006-12-13 00:34:08 -0800 | [diff] [blame] | 295 | |
Masahiro Yamada | 8741908 | 2019-03-11 01:13:15 +0900 | [diff] [blame] | 296 | char *configname; |
Boris Barbulovski | 85eaf28 | 2015-09-22 11:36:03 -0700 | [diff] [blame] | 297 | static QAction *saveAction; |
Karsten Wiese | 3b354c5 | 2006-12-13 00:34:08 -0800 | [diff] [blame] | 298 | static void conf_changed(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | public: |
| 300 | ConfigMainWindow(void); |
| 301 | public slots: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 302 | void changeMenu(struct menu *); |
Mauro Carvalho Chehab | b311142 | 2020-04-02 11:28:01 +0200 | [diff] [blame] | 303 | void changeItens(struct menu *); |
Roman Zippel | b65a47e | 2006-06-08 22:12:47 -0700 | [diff] [blame] | 304 | void setMenuLink(struct menu *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 305 | void listFocusChanged(void); |
| 306 | void goBack(void); |
| 307 | void loadConfig(void); |
Michal Marek | bac6aa8 | 2011-05-25 15:10:25 +0200 | [diff] [blame] | 308 | bool saveConfig(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 309 | void saveConfigAs(void); |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 310 | void searchConfig(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 311 | void showSingleView(void); |
| 312 | void showSplitView(void); |
| 313 | void showFullView(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | void showIntro(void); |
| 315 | void showAbout(void); |
| 316 | void saveSettings(void); |
| 317 | |
| 318 | protected: |
| 319 | void closeEvent(QCloseEvent *e); |
| 320 | |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 321 | ConfigSearchWindow *searchWindow; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 322 | ConfigView *menuView; |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 323 | ConfigList *menuList; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 324 | ConfigView *configView; |
Boris Barbulovski | 1019f1a | 2015-09-22 11:36:17 -0700 | [diff] [blame] | 325 | ConfigList *configList; |
Roman Zippel | 43bf612 | 2006-06-08 22:12:45 -0700 | [diff] [blame] | 326 | ConfigInfoView *helpText; |
Boris Barbulovski | b1f8a45 | 2015-09-22 11:36:02 -0700 | [diff] [blame] | 327 | QToolBar *toolBar; |
Boris Barbulovski | 85eaf28 | 2015-09-22 11:36:03 -0700 | [diff] [blame] | 328 | QAction *backAction; |
Boris Barbulovski | 780505e | 2015-09-22 11:36:13 -0700 | [diff] [blame] | 329 | QAction *singleViewAction; |
| 330 | QAction *splitViewAction; |
| 331 | QAction *fullViewAction; |
Boris Barbulovski | 7653866 | 2015-09-22 11:36:14 -0700 | [diff] [blame] | 332 | QSplitter *split1; |
| 333 | QSplitter *split2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 334 | }; |