widgets/matrixeditor.h

changeset 252
da4876bfd822
parent 206
654661eab7f3
child 253
8b994c917f69
equal deleted inserted replaced
251:94b0a30a1886 252:da4876bfd822
1 #pragma once
2 #include <QWidget>
3 #include <glm/glm.hpp>
4
5 namespace Ui {
6 class MatrixEditor;
7 }
8
9 class MatrixEditor : public QWidget
10 {
11 Q_OBJECT
12 public:
13 explicit MatrixEditor(QWidget *parent = nullptr);
14 explicit MatrixEditor(const glm::mat4 value, QWidget* parent = nullptr);
15 ~MatrixEditor();
16 glm::mat4 value() const;
17 void setValue(const glm::mat4& value);
18 Q_SIGNALS:
19 void valueChanged(const glm::mat4& value);
20 private:
21 constexpr int matrixSize() const;
22 Q_SLOT void multiplyButtonPressed();
23 class QDoubleSpinBox* spinboxes[4][3];
24 Ui::MatrixEditor *ui;
25 };
26
27 constexpr int MatrixEditor::matrixSize() const
28 {
29 return 4;
30 }

mercurial