src/tools/transformtool.h

Fri, 04 Mar 2022 11:40:19 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 04 Mar 2022 11:40:19 +0200
changeset 153
2f79053c2e9a
parent 152
03f8e6d42e13
child 163
36ea1a8aee33
permissions
-rw-r--r--

Renamed modeleditcontext.cpp -> modeleditor.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:
152
03f8e6d42e13 Major refactoring
Teemu Piippo <teemu@hecknology.net>
parents: 143
diff changeset
10 Q_INVOKABLE TransformTool(Document *document);
127
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 virtual QString name() const override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
12 virtual QString toolTip() const override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
13 void selectionChanged(const QSet<ldraw::id_t> &newSelection) override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
14 QWidget *toolWidget() override;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 private:
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16 Q_SLOT void applyButtonClicked();
143
7b62c52835a1 Fix memory corruption involving document tools.
Teemu Piippo <teemu@hecknology.net>
parents: 127
diff changeset
17 MatrixEditor* matrixEditor;
127
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 QPushButton* button;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 QWidget* widget;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 QSet<ldraw::id_t> selection;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 };

mercurial