src/toolsets/viewtoolset.h

Tue, 01 Jan 2019 22:30:10 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 01 Jan 2019 22:30:10 +0200
changeset 1437
1a77c6156db7
parent 1390
3eace926af7f
permissions
-rw-r--r--

commit work done on mdi

969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
1326
69a90bd2dba2 Happy new year 2018
Teemu Piippo <teemu@hecknology.net>
parents: 1119
diff changeset
3 * Copyright (C) 2013 - 2018 Teemu Piippo
969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #pragma once
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #include "toolset.h"
1437
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
21 #include "glrenderer.h"
969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 class ViewToolset : public Toolset
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 {
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 Q_OBJECT
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 public:
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 ViewToolset (MainWindow* parent);
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30 Q_INVOKABLE void axes();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 Q_INVOKABLE void bfcView();
1369
1e2391b78d17 added cull depth support
Teemu Piippo <teemu@hecknology.net>
parents: 1326
diff changeset
32 Q_INVOKABLE void clearCullDepth();
1390
3eace926af7f added draw plane feature (doesn't work with circle draw quite right yet)
Teemu Piippo <teemu@hecknology.net>
parents: 1369
diff changeset
33 Q_INVOKABLE void clearDrawPlane();
969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34 Q_INVOKABLE void drawAngles();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 Q_INVOKABLE void drawConditionalLines();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 Q_INVOKABLE void drawEdgeLines();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37 Q_INVOKABLE void drawSurfaces();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 Q_INVOKABLE void jumpTo();
1119
749fdf61b5cd Implemented lighting. Yay! Unfortunately, faces that show up the wrong way around in BFC red/green mode also show up with inverted lighting here.
Teemu Piippo <teemu@hecknology.net>
parents: 1100
diff changeset
39 Q_INVOKABLE void lighting();
969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 Q_INVOKABLE void randomColors();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41 Q_INVOKABLE void resetView();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42 Q_INVOKABLE void screenshot();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 Q_INVOKABLE void selectAll();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
44 Q_INVOKABLE void selectByColor();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
45 Q_INVOKABLE void selectByType();
1390
3eace926af7f added draw plane feature (doesn't work with circle draw quite right yet)
Teemu Piippo <teemu@hecknology.net>
parents: 1369
diff changeset
46 Q_INVOKABLE void setDrawPlane();
1369
1e2391b78d17 added cull depth support
Teemu Piippo <teemu@hecknology.net>
parents: 1326
diff changeset
47 Q_INVOKABLE void setCullDepth();
969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
48 Q_INVOKABLE void visibilityHide();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
49 Q_INVOKABLE void visibilityReveal();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
50 Q_INVOKABLE void visibilityToggle();
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
51 Q_INVOKABLE void wireframe();
1437
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
52
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
53 Q_INVOKABLE void newTopCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
54 Q_INVOKABLE void newFrontCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
55 Q_INVOKABLE void newLeftCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
56 Q_INVOKABLE void newBottomCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
57 Q_INVOKABLE void newBackCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
58 Q_INVOKABLE void newRightCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
59 Q_INVOKABLE void newFreeCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
60 Q_INVOKABLE void selectTopCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
61 Q_INVOKABLE void selectFrontCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
62 Q_INVOKABLE void selectLeftCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
63 Q_INVOKABLE void selectBottomCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
64 Q_INVOKABLE void selectBackCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
65 Q_INVOKABLE void selectRightCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
66 Q_INVOKABLE void selectFreeCamera();
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
67
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
68 private:
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
69 void createNewCamera(gl::CameraType cameraType);
1a77c6156db7 commit work done on mdi
Teemu Piippo <teemu@hecknology.net>
parents: 1390
diff changeset
70 void selectCamera(gl::CameraType cameraType);
969
b1742ee91d5b Split actions.cpp and actionsEdit.cpp into toolsets.
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
71 };

mercurial