widgets/matrixeditor.h

Sun, 26 Jun 2022 20:54:09 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 26 Jun 2022 20:54:09 +0300
changeset 262
dc33f8a707c4
parent 253
8b994c917f69
permissions
-rw-r--r--

Add action to make a model unofficial (modifies the !LDRAW_ORG line)

#pragma once
#include <QWidget>
#include <glm/glm.hpp>

class MatrixEditor : public QWidget
{
	Q_OBJECT
public:
	explicit MatrixEditor(QWidget *parent = nullptr);
	explicit MatrixEditor(const glm::mat4 value, QWidget* parent = nullptr);
	~MatrixEditor();
	glm::mat4 value() const;
	void setValue(const glm::mat4& value);
Q_SIGNALS:
	void valueChanged(const glm::mat4& value);
private:
	constexpr int matrixSize() const;
	Q_SLOT void multiplyButtonPressed();
	class QDoubleSpinBox* spinboxes[4][3];
	class Ui_MatrixEditor *ui;
};

constexpr int MatrixEditor::matrixSize() const
{
	return 4;
}

mercurial