1 #ifndef __ACTIONHANDLER_H__
2 #define __ACTIONHANDLER_H__
7 class QG_MainWindowInterface;
12 * This class can trigger actions (from menus, buttons, ...).
14 class ActionHandler: public QObject
19 ActionHandler(QG_MainWindowInterface * mw);
20 virtual ~ActionHandler();
22 ActionInterface * getCurrentAction();
23 ActionInterface * setCurrentAction(RS2::ActionType id);
24 void killSelectActions();
26 bool keycode(const QString & code);
27 bool command(const QString & cmd);
28 QStringList getAvailableCommands();
31 /*void slotFileNew();*/
34 void slotFileOpen(const QString& fileName);
37 void slotFileSaveAs();
46 void slotZoomWindow();
48 void slotZoomPrevious();
49 void slotZoomRedraw();
51 void slotToolRegenerateDimensions();
59 void slotSelectSingle();
60 void slotSelectContour();
61 void slotSelectWindow();
62 void slotDeselectWindow();
64 void slotDeselectAll();
65 void slotSelectInvert();
66 void slotSelectIntersected();
67 void slotDeselectIntersected();
68 void slotSelectLayer();
72 void slotDrawLineAngle();
73 void slotDrawLineHorizontal();
74 void slotDrawLineVertical();
75 void slotDrawLineFree();
76 void slotDrawLineHorVert();
77 void slotDrawLineParallel();
78 void slotDrawLineParallelThrough();
79 void slotDrawLineRectangle();
80 void slotDrawLineBisector();
81 void slotDrawLineTangent1();
82 void slotDrawLineTangent2();
83 void slotDrawLineOrthogonal();
84 void slotDrawLineRelAngle();
85 void slotDrawLinePolygon();
86 void slotDrawLinePolygon2();
87 void slotDrawCircle();
88 void slotDrawCircleCR();
89 void slotDrawCircle2P();
90 void slotDrawCircle3P();
91 void slotDrawCircleParallel();
94 void slotDrawArcParallel();
95 void slotDrawArcTangential();
96 void slotDrawEllipseAxis();
97 void slotDrawEllipseArcAxis();
98 void slotDrawSpline();
100 void slotDrawHatch();
101 void slotDrawImage();
102 void slotDrawPolyline();
103 void slotPolylineAdd();
104 void slotPolylineAppend();
105 void slotPolylineDel();
106 void slotPolylineDelBetween();
107 void slotPolylineTrim();
109 void slotDimAligned();
110 void slotDimLinear();
111 void slotDimLinearHor();
112 void slotDimLinearVer();
113 void slotDimRadial();
114 void slotDimDiametric();
115 void slotDimAngular();
116 void slotDimLeader();
118 void slotModifyAttributes();
119 void slotModifyDelete();
120 void slotModifyDeleteQuick();
121 void slotModifyDeleteFree();
122 void slotModifyMove();
123 void slotModifyScale();
124 void slotModifyRotate();
125 void slotModifyMirror();
126 void slotModifyMoveRotate();
127 void slotModifyRotate2();
128 void slotModifyEntity();
129 void slotModifyTrim();
130 void slotModifyTrim2();
131 void slotModifyTrimAmount();
132 void slotModifyCut();
133 void slotModifyStretch();
134 void slotModifyBevel();
135 void slotModifyRound();
136 void slotModifyExplodeText();
140 void slotSnapEndpoint();
141 void slotSnapOnEntity();
142 void slotSnapCenter();
143 void slotSnapMiddle();
145 void slotSnapIntersection();
146 void slotSnapIntersectionManual();
148 void slotRestrictNothing();
149 void slotRestrictOrthogonal();
150 void slotRestrictHorizontal();
151 void slotRestrictVertical();
154 void disableRestrictions();
155 void updateSnapMode();
157 void slotSetRelativeZero();
158 void slotLockRelativeZero(bool on);
160 void slotInfoInside();
162 void slotInfoDist2();
163 void slotInfoAngle();
164 void slotInfoTotalLength();
167 void slotLayersDefreezeAll();
168 void slotLayersFreezeAll();
169 void slotLayersAdd();
170 void slotLayersRemove();
171 void slotLayersEdit();
172 void slotLayersToggleView();
173 void slotLayersToggleLock();
175 void slotBlocksDefreezeAll();
176 void slotBlocksFreezeAll();
177 void slotBlocksAdd();
178 void slotBlocksRemove();
179 void slotBlocksAttributes();
180 void slotBlocksEdit();
181 void slotBlocksInsert();
182 void slotBlocksToggleView();
183 void slotBlocksCreate();
184 void slotBlocksExplode();
186 void slotOptionsDrawing();
188 void slotCamExportAuto();
189 void slotCamReorder();
191 void slotFocusNormal();
193 void setActionSnapFree(QAction * a);
194 void setActionSnapGrid(QAction * a);
195 void setActionSnapEndpoint(QAction * a);
196 void setActionSnapOnEntity(QAction * a);
197 void setActionSnapCenter(QAction * a);
198 void setActionSnapMiddle(QAction * a);
199 void setActionSnapDist(QAction * a);
200 void setActionSnapIntersection(QAction * a);
201 void setActionSnapIntersectionManual(QAction * a);
202 void setActionRestrictNothing(QAction * a);
203 void setActionRestrictOrthogonal(QAction * a);
204 void setActionRestrictHorizontal(QAction * a);
205 void setActionRestrictVertical(QAction * a);
206 void setActionLockRelativeZero(QAction * a);
208 void setCadToolBarSnap(CadToolBarSnap * tb);
211 QG_MainWindowInterface * mainWindow;
212 CadToolBarSnap * cadToolBarSnap;
216 QAction * snapEndpoint;
217 QAction * snapOnEntity;
218 QAction * snapCenter;
219 QAction * snapMiddle;
221 QAction * snapIntersection;
222 QAction * snapIntersectionManual;
224 QAction * restrictNothing;
225 QAction * restrictOrthogonal;
226 QAction * restrictHorizontal;
227 QAction * restrictVertical;
229 QAction * lockRelativeZero;
232 #endif // __ACTIONHANDLER_H__