src/widgets/matrixeditor.h

Wed, 15 Jun 2022 19:47:02 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 15 Jun 2022 19:47:02 +0300
changeset 231
a9bf6bab5ea2
parent 206
654661eab7f3
permissions
-rw-r--r--

Add wireframe button

#pragma once
#include <QWidget>
#include "basics.h"

namespace Ui {
class MatrixEditor;
}

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];
	Ui::MatrixEditor *ui;
};

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

mercurial