widgets/vec3editor.h

changeset 252
da4876bfd822
parent 206
654661eab7f3
child 254
b7b29cb82360
equal deleted inserted replaced
251:94b0a30a1886 252:da4876bfd822
1 #pragma once
2 #include <QWidget>
3 #include <glm/glm.hpp>
4
5 namespace Ui
6 {
7 class Vec3Editor;
8 }
9
10 class Vec3Editor : public QWidget
11 {
12 Q_OBJECT
13 public:
14 enum Flag
15 {
16 NoMultiplyButton = 0x1
17 };
18 explicit Vec3Editor(const glm::vec3& value, QWidget* parent = nullptr, QFlags<Flag> flags = {});
19 ~Vec3Editor();
20 glm::vec3 value() const;
21 void setValue(const glm::vec3& value);
22 Q_SIGNALS:
23 void valueChanged(const glm::vec3& value);
24 private:
25 std::array<class DoubleSpinBox*, 3> spinboxes();
26 Q_SLOT void multiplyPressed();
27 std::unique_ptr<Ui::Vec3Editor> ui;
28 };
29
30 Q_DECLARE_OPERATORS_FOR_FLAGS(QFlags<Vec3Editor::Flag>)

mercurial