| 1 | struct StateManager : ToolsLayout { |
| 2 | ListView stateList; |
| 3 | HorizontalLayout descLayout; |
| 4 | Label descLabel; |
| 5 | LineEdit descEdit; |
| 6 | HorizontalLayout controlLayout; |
| 7 | Button saveButton; |
| 8 | Button loadButton; |
| 9 | Widget spacer; |
| 10 | Button resetButton; |
| 11 | Button eraseButton; |
| 12 | |
| 13 | void reset(); |
| 14 | bool load(string filename, unsigned revision); |
| 15 | bool save(string filename, unsigned revision); |
| 16 | |
| 17 | void slotLoad(); |
| 18 | void slotSave(); |
| 19 | void slotErase(); |
| 20 | string slotLoadDescription(unsigned id); |
| 21 | void slotSaveDescription(); |
| 22 | |
| 23 | void refresh(); |
| 24 | void synchronize(); |
| 25 | StateManager(); |
| 26 | |
| 27 | private: |
| 28 | enum : unsigned { |
| 29 | Slots = 32, |
| 30 | HeaderLength = 72, |
| 31 | DescriptionLength = 512, |
| 32 | }; |
| 33 | serializer slot[Slots]; |
| 34 | }; |
| 35 | |
| 36 | extern StateManager* stateManager; |