| 1 | #ifndef SYMBOLMANAGER_OPENMSX_H |
| 2 | #define SYMBOLMANAGER_OPENMSX_H |
| 3 | |
| 4 | #include "ui_SymbolManager.h" |
| 5 | |
| 6 | class SymbolTable; |
| 7 | class QTreeWidgetItem; |
| 8 | |
| 9 | class SymbolManager : public QDialog, private Ui::SymbolManager |
| 10 | { |
| 11 | Q_OBJECT |
| 12 | public: |
| 13 | SymbolManager(SymbolTable& symtable, QWidget* parent = nullptr); |
| 14 | |
| 15 | void refresh(); |
| 16 | |
| 17 | signals: |
| 18 | void symbolTableChanged(); |
| 19 | |
| 20 | private: |
| 21 | void closeEvent(QCloseEvent* e) override; |
| 22 | |
| 23 | void initFileList(); |
| 24 | void createComboBox(int row); |
| 25 | void initSymbolList(); |
| 26 | |
| 27 | void closeEditor(); |
| 28 | |
| 29 | // formatting functions |
| 30 | void updateItemName(QTreeWidgetItem* item); |
| 31 | void updateItemType(QTreeWidgetItem* item); |
| 32 | void updateItemValue(QTreeWidgetItem* item); |
| 33 | void updateItemSlots(QTreeWidgetItem* item); |
| 34 | void updateItemSegments(QTreeWidgetItem* item); |
| 35 | void updateItemRegisters(QTreeWidgetItem* item); |
| 36 | |
| 37 | void beginTreeLabelsUpdate(); |
| 38 | void endTreeLabelsUpdate(); |
| 39 | |
| 40 | void fileSelectionChange(); |
| 41 | void addFile(); |
| 42 | void removeFile(); |
| 43 | void reloadFiles(); |
| 44 | void addSymbolFileDestination(int fileIndex, int validSlot); |
| 45 | void addLabel(); |
| 46 | void removeLabel(); |
| 47 | void labelEdit(QTreeWidgetItem* item, int column); |
| 48 | void labelChanged(QTreeWidgetItem* item, int column); |
| 49 | void labelSelectionChanged(); |
| 50 | void changeType(bool checked); |
| 51 | void changeSlot(int id, int state); |
| 52 | void changeSlot00(int state); |
| 53 | void changeSlot01(int state); |
| 54 | void changeSlot02(int state); |
| 55 | void changeSlot03(int state); |
| 56 | void changeSlot10(int state); |
| 57 | void changeSlot11(int state); |
| 58 | void changeSlot12(int state); |
| 59 | void changeSlot13(int state); |
| 60 | void changeSlot20(int state); |
| 61 | void changeSlot21(int state); |
| 62 | void changeSlot22(int state); |
| 63 | void changeSlot23(int state); |
| 64 | void changeSlot30(int state); |
| 65 | void changeSlot31(int state); |
| 66 | void changeSlot32(int state); |
| 67 | void changeSlot33(int state); |
| 68 | void changeRegister(int id, int state); |
| 69 | void changeRegisterA(int state); |
| 70 | void changeRegisterB(int state); |
| 71 | void changeRegisterC(int state); |
| 72 | void changeRegisterD(int state); |
| 73 | void changeRegisterE(int state); |
| 74 | void changeRegisterH(int state); |
| 75 | void changeRegisterL(int state); |
| 76 | void changeRegisterBC(int state); |
| 77 | void changeRegisterDE(int state); |
| 78 | void changeRegisterHL(int state); |
| 79 | void changeRegisterIX(int state); |
| 80 | void changeRegisterIY(int state); |
| 81 | void changeRegisterIXL(int state); |
| 82 | void changeRegisterIXH(int state); |
| 83 | void changeRegisterIYL(int state); |
| 84 | void changeRegisterIYH(int state); |
| 85 | void changeRegisterOffset(int state); |
| 86 | void changeRegisterI(int state); |
| 87 | void wipeSelectedItem(); |
| 88 | |
| 89 | private: |
| 90 | SymbolTable& symTable; |
| 91 | int treeLabelsUpdateCount; |
| 92 | QCheckBox* chkSlots[16]; |
| 93 | QCheckBox* chkRegs[18]; |
| 94 | QTreeWidgetItem* editItem; |
| 95 | int editColumn; |
| 96 | }; |
| 97 | |
| 98 | #endif // SYMBOLMANAGER_OPENMSX_H |