src/tools/transformtool.h

Fri, 17 Sep 2021 22:43:22 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 17 Sep 2021 22:43:22 +0300
changeset 131
e2080ac44039
parent 127
f64bfb7f5d26
child 143
7b62c52835a1
permissions
-rw-r--r--

add missing change to document.cpp

127
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #pragma once
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include <QPushButton>
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 #include "basetool.h"
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 #include "widgets/matrixeditor.h"
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 class TransformTool : public BaseTool
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 {
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 Q_OBJECT
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
9 public:
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
10 Q_INVOKABLE TransformTool(Model *model, QObject *parent = nullptr);
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 ~TransformTool();
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 virtual QString name() const override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 virtual QString toolTip() const override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 void selectionChanged(const QSet<ldraw::id_t> &newSelection) override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 QWidget *toolWidget() override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 private:
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 Q_SLOT void applyButtonClicked();
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 Model* const model;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 MatrixEditor matrixEditor;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 QPushButton* button;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 QWidget* widget;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22 QSet<ldraw::id_t> selection;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
23 };

mercurial