src/widgets/colorselectdialog.h

changeset 205
1a4342d80de7
parent 139
72098474d362
child 206
654661eab7f3
equal deleted inserted replaced
204:52e10e8d88cc 205:1a4342d80de7
8 8
9 class ColorSelectDialog : public QDialog 9 class ColorSelectDialog : public QDialog
10 { 10 {
11 Q_OBJECT 11 Q_OBJECT
12 public: 12 public:
13 explicit ColorSelectDialog(const ldraw::ColorTable& colorTable, QWidget* parent = nullptr); 13 explicit ColorSelectDialog(const ColorTable& colorTable, QWidget* parent = nullptr);
14 ~ColorSelectDialog(); 14 ~ColorSelectDialog();
15 void setCurrentColor(ldraw::Color color); 15 void setCurrentColor(ColorIndex color);
16 ldraw::Color currentColor() const; 16 ldraw::Color currentColor() const;
17 private Q_SLOTS: 17 private Q_SLOTS:
18 void populateColors(); 18 void populateColors();
19 void updateSelectedColorTexts(); 19 void updateSelectedColorTexts();
20 void handleButtonClick(); 20 void handleButtonClick();
22 void chooseDirectColor(); 22 void chooseDirectColor();
23 private: 23 private:
24 void makeColorButtons(); 24 void makeColorButtons();
25 bool filterColor(ldraw::Color color) const; 25 bool filterColor(ldraw::Color color) const;
26 class Ui_ColorSelectDialog& ui; 26 class Ui_ColorSelectDialog& ui;
27 const ldraw::ColorTable& colorTable; 27 const ColorTable& colorTable;
28 std::vector<QPushButton*> buttons; 28 std::vector<QPushButton*> buttons;
29 ldraw::Color selectedColor = ldraw::MAIN_COLOR; 29 ColorIndex selectedColor = MAIN_COLOR;
30 }; 30 };

mercurial