forked from JamesMcCrae/flatfab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
239 lines (201 loc) · 5.61 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui>
#include <QWebView>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
#include "glwidget.h"
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
~MainWindow();
protected:
void keyPressEvent(QKeyEvent * event);
void keyReleaseEvent(QKeyEvent * event);
private slots:
void ShowAppWidgets();
void UpdateWindowTitle();
void NewPlaneSketch();
void LoadTemplateOBJ();
void LoadTemplateCurve();
void LoadTemplateImage();
void LoadPlaneSketch();
void SavePlaneSketch();
void SaveSliceOBJ();
void SaveSlabOBJ();
void SaveFlattenedSlabOBJ();
void SaveSurfaceOBJ();
void SaveSVG();
void SaveDXF();
void SavePhysicsOutput();
void SaveCalibration();
void Exit();
void Undo();
void Redo();
void Delete();
void Transform();
void CopyMirrorX();
void CopyRotateY();
void CopyMirrorZ();
void CopyDuplicate();
void SnapToMajorAxis();
void AddHoleBoundary();
void RemoveHolesBoundary();
void ResketchCurve();
void CreateSurfacePatches();
void DeleteSurfacePatches();
void ToggleUseMagneticCuts();
void TogglePenMode();
void ToggleLocalSymmetry();
void StartDimensioningTool();
void ViewIso1();
void ViewIso2();
void ViewIso3();
void ViewIso4();
void ViewX();
void ViewY();
void ViewZ();
void ViewPart();
void ToggleCyclesTest();
void ToggleConnectedTest();
void ToggleStabilityTest();
void ToggleShowTNBFrames();
void ToggleShowShadow();
void ToggleShowTemplates();
void SetMultisampling0();
void SetMultisampling4();
void SetMultisampling16();
void GenerateBranchingSetRoot();
void GenerateBranching();
void GenerateLinear();
void GenerateBlend();
void GenerateGrid();
void GenerateRevolve();
void GenerateMakeCircle();
void GenerateMakeRectangle();
void GenerateMakeRadial();
void GenerateMakeRadialHole();
void GenerateSurfaceFacets();
void GenerateSlices();
void TogglePhysicsTest();
void TogglePhysicsDeformed();
void TogglePhysicsSkeleton();
void TogglePhysicsForce();
void TogglePhysicsSection();
void TogglePhysicsSectionMoment();
void PhysicsAddExternalMass();
void PhysicsRemoveExternalMasses();
void closeDialog();
// New UI features
void openEditWidget();
void openGenerateWidget();
void openGuidesWidget();
void openPhysicsWidget();
void openViewWidget();
void setEditMenuChecks();
void setViewMenuChecks();
void setPhysicsMenuChecks();
private:
void createActions();
void createMenus();
void ShowWelcomePage();
void SendTrackRequest();
void SetMultisampling(const int i);
virtual void resizeEvent(QResizeEvent * event);
virtual void moveEvent(QMoveEvent * event);
QMenu *fileMenu;
QAction *newPlaneSketchAct;
QAction *loadCurveAct;
QAction *loadImageAct;
QAction *loadOBJAct;
QAction *loadPlaneSketchAct;
QAction *savePlaneSketchAct;
QAction *saveSliceOBJAct;
QAction *saveSlabOBJAct;
QAction *saveFlattenedSlabOBJAct;
QAction *saveSurfaceOBJAct;
QAction *saveSVGAct;
QAction *saveDXFAct;
QAction *saveCalibrationAct;
QAction *savePhysicsOutput;
QAction *exitAct;
QMenu *editMenu;
QAction *useLocalSymmetryAct;
QAction *copyMirrorXAct;
QAction *copyRotateYAct;
QAction *copyMirrorZAct;
QAction *copyDuplicateAct;
QAction *undoAct;
QAction *redoAct;
QAction *deleteAct;
QAction *transformAct;
QAction *resketchCurveAct;
QAction *addHoleBoundaryAct;
QAction *removeHolesBoundaryAct;
QAction *dimensioningToolAct;
QAction *snapMajorAxisAct;
QAction *useMagneticCutsAct;
QAction *createSurfacePatchesAct;
QAction *deleteSurfacePatchesAct;
QMenu *viewMenu;
QAction *viewIso1Act;
QAction *viewIso2Act;
QAction *viewIso3Act;
QAction *viewIso4Act;
QAction *viewXAct;
QAction *viewYAct;
QAction *viewZAct;
QAction *viewPartAct;
QAction *viewTNBFramesAct;
QAction *viewShadowAct;
QAction *viewTemplatesAct;
QAction *testCyclesAct;
QAction *testConnectedAct;
QAction *testStabilityAct;
QAction *multisample0Act;
QAction *multisample4Act;
QAction *multisample16Act;
QMenu *generateMenu;
QAction *generateBranchingSetRootAct;
QAction *generateBranchingAct;
QAction *generateLinearAct;
QAction *generateBlendAct;
QAction *generateGridAct;
QAction *generateRevolveAct;
QAction *generateMakeCircleAct;
QAction *generateMakeRectangleAct;
QAction *generateMakeRadialAct;
QAction *generateMakeRadialHoleAct;
QAction *generateSlicesAct;
QAction *generateSurfaceFacetsAct;
QMenu *physicsMenu;
QAction *testPhysicsAct;
QAction *showPhysicsDeformedAct;
QAction *showPhysicsSkeletonAct;
QAction *showPhysicsForceAct;
QAction *showPhysicsSectionAct;
QAction *showPhysicsSectionMomentAct;
QAction *addExternalWeightAct;
QAction *removeExternalWeightsAct;
GLWidget glWidget;
//QWidget * sideWidget;
QDockWidget * dockWidget;
QWidget * bottomWidget;
QDockWidget * bottomDockWidget;
QWebView * webView;
// New UI features
void createSideBar();
QToolBar *mainToolBar;
QAction *openDock[5];
QDockWidget *docks[5];
void createQuickToolBar();
QToolBar *quickToolBar;
QDockWidget * toolWidget;
QString window_title;
QTimer window_title_timer;
};
#endif // MAINWINDOW_H