Tue, 28 Jun 2022 11:51:17 +0300
- Add CMake build type to about page and window title
- Use locale-dependant short date format in window title and long format in about page
- Move version definition into project() call
- Renamed the c++ macros to match CMake variable names
95 | 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:
206
diff
changeset
|
2 | #include "src/basics.h" |
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:
206
diff
changeset
|
3 | #include "src/colors.h" |
95 | 4 | #include <QPushButton> |
5 | #include <QAbstractTableModel> | |
6 | #include <QDialog> | |
7 | #include <QGridLayout> | |
8 | ||
9 | class ColorSelectDialog : public QDialog | |
10 | { | |
11 | Q_OBJECT | |
12 | public: | |
205 | 13 | explicit ColorSelectDialog(const ColorTable& colorTable, QWidget* parent = nullptr); |
95 | 14 | ~ColorSelectDialog(); |
205 | 15 | void setCurrentColor(ColorIndex color); |
95 | 16 | ldraw::Color currentColor() const; |
112 | 17 | private Q_SLOTS: |
95 | 18 | void populateColors(); |
19 | void updateSelectedColorTexts(); | |
20 | void handleButtonClick(); | |
21 | void spinboxEdited(); | |
22 | void chooseDirectColor(); | |
23 | private: | |
24 | void makeColorButtons(); | |
25 | bool filterColor(ldraw::Color color) const; | |
26 | class Ui_ColorSelectDialog& ui; | |
205 | 27 | const ColorTable& colorTable; |
95 | 28 | std::vector<QPushButton*> buttons; |
205 | 29 | ColorIndex selectedColor = MAIN_COLOR; |
95 | 30 | }; |