src/widgets/vec3editor.h

Sun, 10 Jan 2021 17:26:40 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 10 Jan 2021 17:26:40 +0200
changeset 98
ae14da3d883f
parent 83
b8bd338eb602
child 105
6ca6e8c647d4
permissions
-rw-r--r--

added translations to dependencies in CMakeLists... maybe that's the source of the trouble with translations getting emptied

#pragma once
#include <QWidget>
#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<Flag> flags = 0);
	~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