src/dialogs/circularprimitiveeditor.h

Thu, 21 Jun 2018 19:21:49 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 21 Jun 2018 19:21:49 +0300
changeset 1418
503d4e7e27c9
parent 1413
6b0ca41c158f
permissions
-rw-r--r--

used the new CircularSectionEditor in CircularPrimitiveEditor

1406
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
1 /*
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
2 * LDForge: LDraw parts authoring CAD
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
3 * Copyright (C) 2013 - 2018 Teemu Piippo
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
4 *
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
5 * This program is free software: you can redistribute it and/or modify
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
6 * it under the terms of the GNU General Public License as published by
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
8 * (at your option) any later version.
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
9 *
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
10 * This program is distributed in the hope that it will be useful,
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
13 * GNU General Public License for more details.
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
14 *
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
15 * You should have received a copy of the GNU General Public License
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
17 */
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
18
1395
23551de3da36 separated the color button into a new widget
Teemu Piippo <teemu@hecknology.net>
parents: 1391
diff changeset
19 #pragma once
1391
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 #include <QDialog>
1406
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
21 #include "../linetypes/circularprimitive.h"
1391
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
22
1406
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
23 class CircularPrimitiveEditor : public QDialog
1391
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
24 {
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
25 Q_OBJECT
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 public:
1406
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
28 explicit CircularPrimitiveEditor(LDCircularPrimitive* primitive = nullptr, QWidget* parent = nullptr);
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
29 ~CircularPrimitiveEditor();
1391
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
30
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
31 private:
1406
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
32 Q_SLOT void updateWidgets();
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
33 Q_SLOT void reset();
1413
6b0ca41c158f added buttons to rotate circular primitives
Teemu Piippo <teemu@hecknology.net>
parents: 1406
diff changeset
34 void rotate(double factor);
1406
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
35
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
36 class Ui_CircularPrimitiveEditor& ui;
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
37 LDCircularPrimitive* primitive;
37fffb682d2f Circular primitive editor complete
Teemu Piippo <teemu@hecknology.net>
parents: 1395
diff changeset
38 LDObjectState originalState;
1391
5fa4bf1fc781 added work done on cylinders
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
39 };

mercurial