Sun, 09 Apr 2023 15:59:08 +0300
Extracted the state of the program into a MainState structure, and extracted local functions of main() into static functions.
I was planning to make the core logic and state of the program into a Main class, which would be a QObject that would
have lots of signals and slots, but it looks like this works even without it
| 178 | 1 | #pragma once |
|
264
76a025db4948
Convert all includes to be relative to project root directory. Files that cannot be found in this manner use angle brackets.
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
263
diff
changeset
|
2 | #include "src/colors.h" |
| 178 | 3 | |
| 4 | class ColorIndexInput : public QWidget | |
| 5 | { | |
| 6 | Q_OBJECT | |
|
258
fe094d0687ad
Add widgets to object editor
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
214
diff
changeset
|
7 | const ColorTable* colorTable = nullptr; |
|
fe094d0687ad
Add widgets to object editor
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
214
diff
changeset
|
8 | class Ui_ColorIndexInput& ui; |
| 178 | 9 | public: |
|
258
fe094d0687ad
Add widgets to object editor
Teemu Piippo <teemu.s.piippo@gmail.com>
parents:
214
diff
changeset
|
10 | ColorIndexInput(QWidget *parent = nullptr); |
| 178 | 11 | ~ColorIndexInput(); |
| 12 | ldraw::Color selectedColor() const; | |
| 13 | void setSelectedColor(ldraw::Color color); | |
| 14 | Q_SIGNALS: | |
| 15 | void colorChanged(ldraw::Color color); | |
| 16 | private: | |
| 17 | }; |