src/widgets/vec3editor.h

Tue, 14 Jun 2022 20:35:11 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Tue, 14 Jun 2022 20:35:11 +0300
changeset 219
571e85c0d811
parent 206
654661eab7f3
permissions
-rw-r--r--

fix comment

#pragma once
#include <QWidget>
#include "basics.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<Flag> flags = {});
	~Vec3Editor();
	glm::vec3 value() const;
	void setValue(const glm::vec3& value);
Q_SIGNALS:
	void valueChanged(const glm::vec3& value);
private:
	std::array<class DoubleSpinBox*, 3> spinboxes();
	Q_SLOT void multiplyPressed();
	std::unique_ptr<Ui::Vec3Editor> ui;
};

Q_DECLARE_OPERATORS_FOR_FLAGS(QFlags<Vec3Editor::Flag>)

mercurial