diff -r 764381756899 -r 62373840e33a src/widgets/vec3editor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/widgets/vec3editor.h Tue Mar 17 23:13:29 2020 +0200 @@ -0,0 +1,30 @@ +#pragma once +#include +#include "main.h" + +namespace Ui +{ + class Vec3Editor; +} + +class Vec3Editor : public QWidget +{ + Q_OBJECT +public: + enum Flag + { + NoMultiplyButton = 0x1 + }; + explicit Vec3Editor(const glm::vec3& value = {}, QWidget* parent = nullptr, QFlags flags = 0); + ~Vec3Editor(); + glm::vec3 value() const; + void setValue(const glm::vec3& value); +Q_SIGNALS: + void valueChanged(const glm::vec3& value); +private: + std::array spinboxes(); + Q_SLOT void multiplyPressed(); + std::unique_ptr ui; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QFlags)