src/tools/transformtool.h

Thu, 14 Apr 2022 11:08:20 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 14 Apr 2022 11:08:20 +0300
changeset 186
922662adb72a
parent 163
36ea1a8aee33
permissions
-rw-r--r--

work on circle tool

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;
163
36ea1a8aee33 Add icons for tools
Teemu Piippo <teemu@hecknology.net>
parents: 152
diff changeset
15 QString iconName() const override;
127
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();
143
7b62c52835a1 Fix memory corruption involving document tools.
Teemu Piippo <teemu@hecknology.net>
parents: 127
diff changeset
18 MatrixEditor* matrixEditor;
127
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 QPushButton* button;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 QWidget* widget;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
21 QSet<ldraw::id_t> selection;
f64bfb7f5d26 added a simple matrix transformation tool
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22 };

mercurial