Sat, 04 Aug 2018 21:46:58 +0300
fixed a crash when trying to open a document for the 3rd time after closing it 2 times
1391
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
1 | #pragma once |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
2 | #include <QWidget> |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
3 | #include "../linetypes/modelobject.h" |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
4 | |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
5 | class QDoubleSpinBox; |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
6 | class Ui_MatrixEditor; |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
7 | |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
8 | class MatrixEditor : public QWidget |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
9 | { |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
10 | Q_OBJECT |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
11 | |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
12 | public: |
1403
7a2d84112983
replaced the Matrix class with QMatrix4x4
Teemu Piippo <teemu@hecknology.net>
parents:
1391
diff
changeset
|
13 | MatrixEditor(const QMatrix4x4& matrix = {}, QWidget* parent = nullptr); |
1391
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
14 | MatrixEditor(QWidget* parent); |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
15 | ~MatrixEditor(); |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
16 | |
1403
7a2d84112983
replaced the Matrix class with QMatrix4x4
Teemu Piippo <teemu@hecknology.net>
parents:
1391
diff
changeset
|
17 | QMatrix4x4 matrix() const; |
7a2d84112983
replaced the Matrix class with QMatrix4x4
Teemu Piippo <teemu@hecknology.net>
parents:
1391
diff
changeset
|
18 | void setMatrix(const QMatrix4x4& matrix); |
1391
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
19 | |
1406
37fffb682d2f
Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents:
1403
diff
changeset
|
20 | signals: |
37fffb682d2f
Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents:
1403
diff
changeset
|
21 | void matrixChanged(const QMatrix4x4& matrix); |
37fffb682d2f
Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents:
1403
diff
changeset
|
22 | |
1391
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
23 | private slots: |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
24 | void scalingChanged(); |
1406
37fffb682d2f
Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents:
1403
diff
changeset
|
25 | void matrix3x3Changed(); |
1391
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
26 | |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
27 | private: |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
28 | QDoubleSpinBox* matrixCell(int row, int column) const; |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
29 | double matrixScaling(int column) const; |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
30 | QPair<int, int> cellPosition(QDoubleSpinBox* cellWidget); |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
31 | QDoubleSpinBox* vectorElement(int index); |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
32 | |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
33 | Ui_MatrixEditor& ui; |
5fa4bf1fc781
added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff
changeset
|
34 | }; |