src/widgets/matrixeditor.h

Tue, 27 Jul 2021 09:56:06 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 27 Jul 2021 09:56:06 +0300
changeset 114
4e03b0e2a29f
parent 85
40e2940605a3
child 206
654661eab7f3
permissions
-rw-r--r--

added build-time test for line length

#pragma once
#include <QWidget>
#include "main.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