Actions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef _GUI_ACTIONS_HH_
19 #define _GUI_ACTIONS_HH_
20 
21 #include <string>
22 #include "gazebo/gui/qt.h"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace gui
28  {
29  extern GZ_GUI_VISIBLE QAction *g_newAct;
30  extern GZ_GUI_VISIBLE QAction *g_openAct;
31  extern GZ_GUI_VISIBLE QAction *g_saveAct;
32  extern GZ_GUI_VISIBLE QAction *g_saveAsAct;
33  extern GZ_GUI_VISIBLE QAction *g_saveCfgAct;
34  extern GZ_GUI_VISIBLE QAction *g_cloneAct;
35  extern GZ_GUI_VISIBLE QAction *g_hotkeyChartAct;
36  extern GZ_GUI_VISIBLE QAction *g_aboutAct;
37  extern GZ_GUI_VISIBLE QAction *g_quitAct;
38 
39  extern GZ_GUI_VISIBLE QAction *g_dataLoggerAct;
40 
41  extern GZ_GUI_VISIBLE QAction *g_resetModelsAct;
42  extern GZ_GUI_VISIBLE QAction *g_resetWorldAct;
43  extern GZ_GUI_VISIBLE QAction *g_editBuildingAct;
44  extern GZ_GUI_VISIBLE QAction *g_editTerrainAct;
45  extern GZ_GUI_VISIBLE QAction *g_editModelAct;
46 
47  extern GZ_GUI_VISIBLE QAction *g_playAct;
48  extern GZ_GUI_VISIBLE QAction *g_pauseAct;
49  extern GZ_GUI_VISIBLE QAction *g_stepAct;
50 
51  extern GZ_GUI_VISIBLE QAction *g_boxCreateAct;
52  extern GZ_GUI_VISIBLE QAction *g_sphereCreateAct;
53  extern GZ_GUI_VISIBLE QAction *g_cylinderCreateAct;
54  extern GZ_GUI_VISIBLE QAction *g_pointLghtCreateAct;
55  extern GZ_GUI_VISIBLE QAction *g_spotLghtCreateAct;
56  extern GZ_GUI_VISIBLE QAction *g_dirLghtCreateAct;
57 
58  extern GZ_GUI_VISIBLE QAction *g_screenshotAct;
59 
61  extern GZ_GUI_VISIBLE QAction *g_showCollisionsAct;
62 
64  extern GZ_GUI_VISIBLE QAction *g_showGridAct;
65 
67  extern GZ_GUI_VISIBLE QAction *g_showOriginAct;
68 
70  extern GZ_GUI_VISIBLE QAction *g_showContactsAct;
71 
73  extern GZ_GUI_VISIBLE QAction *g_showJointsAct;
74 
76  extern GZ_GUI_VISIBLE QAction *g_showCOMAct;
77 
79  extern GZ_GUI_VISIBLE QAction *g_showInertiaAct;
80 
82  extern GZ_GUI_VISIBLE QAction *g_showLinkFrameAct;
83 
85  extern GZ_GUI_VISIBLE QAction *g_showSkeletonAct;
86 
87  extern GZ_GUI_VISIBLE QAction *g_transparentAct;
88 
89  extern GZ_GUI_VISIBLE QAction *g_resetAct;
90  extern GZ_GUI_VISIBLE QAction *g_showToolbarsAct;
91  extern GZ_GUI_VISIBLE QAction *g_fullScreenAct;
92  extern GZ_GUI_VISIBLE QAction *g_fpsAct;
93  extern GZ_GUI_VISIBLE QAction *g_orbitAct;
94  extern GZ_GUI_VISIBLE QAction *g_overlayAct;
95 
96  extern GZ_GUI_VISIBLE QAction *g_arrowAct;
97  extern GZ_GUI_VISIBLE QAction *g_translateAct;
98  extern GZ_GUI_VISIBLE QAction *g_rotateAct;
99  extern GZ_GUI_VISIBLE QAction *g_scaleAct;
100 
101  extern GZ_GUI_VISIBLE QAction *g_topicVisAct;
102 
104  extern GZ_GUI_VISIBLE QAction *g_plotAct;
105 
106  extern GZ_GUI_VISIBLE QAction *g_diagnosticsAct;
107 
108  extern GZ_GUI_VISIBLE QAction *g_viewWireframeAct;
109 
110  extern GZ_GUI_VISIBLE QAction *g_viewOculusAct;
111 
113  extern GZ_GUI_VISIBLE QAction *g_cameraOrthoAct;
114 
116  extern GZ_GUI_VISIBLE QAction *g_cameraPerspectiveAct;
117 
118  extern GZ_GUI_VISIBLE QAction *g_copyAct;
119  extern GZ_GUI_VISIBLE QAction *g_pasteAct;
120 
121  extern GZ_GUI_VISIBLE QWidgetAction *g_alignAct;
122  extern GZ_GUI_VISIBLE QAction *g_alignButtonAct;
123  extern GZ_GUI_VISIBLE QAction *g_snapAct;
124 
126  extern GZ_GUI_VISIBLE QWidgetAction *g_viewAngleAct;
127 
129  extern GZ_GUI_VISIBLE QAction *g_viewAngleButtonAct;
130 
132  extern GZ_GUI_VISIBLE QAction *g_undoAct;
133 
135  extern GZ_GUI_VISIBLE QAction *g_redoAct;
136 
138  extern GZ_GUI_VISIBLE QAction *g_undoHistoryAct;
139 
141  extern GZ_GUI_VISIBLE QAction *g_redoHistoryAct;
142 
145  class GZ_GUI_VISIBLE DeleteAction : public QAction
146  {
147  Q_OBJECT
151  public: DeleteAction(const QString &_text, QObject *_parent)
152  : QAction(_text, _parent) {}
153 
156  public: void Signal(const std::string &_modelName)
157  { emit DeleteSignal(_modelName); }
158 
161  Q_SIGNALS: void DeleteSignal(const std::string &_modelName);
162  };
163 
165  extern GZ_GUI_VISIBLE DeleteAction *g_deleteAct;
166  }
167 }
168 #endif
DeleteAction(const QString &_text, QObject *_parent)
Constructor.
Definition: Actions.hh:151
QAction * g_viewAngleButtonAct
Action attached to the view angle button.
QAction * g_resetModelsAct
QAction * g_translateAct
QAction * g_showSkeletonAct
Action to show/hide skeleton visuals for all models.
DeleteAction * g_deleteAct
Action used to delete a model.
QAction * g_showGridAct
Action to show/hide the grid over the ground plane.
QAction * g_fullScreenAct
QAction * g_alignButtonAct
QWidgetAction * g_viewAngleAct
Action to open the view angle widget.
QAction * g_saveCfgAct
QAction * g_viewWireframeAct
QAction * g_redoAct
Action to redo last undone user command.
QAction * g_saveAsAct
QAction * g_cylinderCreateAct
QAction * g_saveAct
QWidgetAction * g_alignAct
QAction * g_pauseAct
QAction * g_scaleAct
QAction * g_viewOculusAct
QAction * g_hotkeyChartAct
QAction * g_quitAct
QAction * g_cloneAct
QAction * g_rotateAct
QAction * g_boxCreateAct
QAction * g_aboutAct
QAction * g_showCollisionsAct
Action to show/hide collision visuals for all models.
QAction * g_copyAct
QAction * g_redoHistoryAct
Action to open the redo history menu.
QAction * g_cameraOrthoAct
Enable orthographic projection action.
QAction * g_showCOMAct
Action to show/hide CoM visuals for all models.
QAction * g_playAct
QAction * g_stepAct
QAction * g_overlayAct
QAction * g_sphereCreateAct
QAction * g_showOriginAct
Action to show/hide the world origin indicator.
QAction * g_undoHistoryAct
Action to open the undo history menu.
Custom delete action.
Definition: Actions.hh:145
QAction * g_resetWorldAct
QAction * g_arrowAct
QAction * g_showJointsAct
Action to show/hide joint visuals for all models.
QAction * g_undoAct
Action to undo last user command.
QAction * g_editTerrainAct
QAction * g_showLinkFrameAct
Action to show/hide link frame visuals for all models.
QAction * g_screenshotAct
QAction * g_dirLghtCreateAct
QAction * g_editBuildingAct
QAction * g_plotAct
Action to show/hide the plotting utitlty.
QAction * g_spotLghtCreateAct
QAction * g_orbitAct
QAction * g_dataLoggerAct
QAction * g_cameraPerspectiveAct
Enable perspective projection action.
QAction * g_showToolbarsAct
QAction * g_pasteAct
QAction * g_pointLghtCreateAct
QAction * g_topicVisAct
void Signal(const std::string &_modelName)
Emit the delete signal.
Definition: Actions.hh:156
QAction * g_showInertiaAct
Action to show/hide inertia visuals for all models.
QAction * g_openAct
QAction * g_fpsAct
QAction * g_resetAct
QAction * g_diagnosticsAct
QAction * g_editModelAct
QAction * g_transparentAct
QAction * g_snapAct
QAction * g_showContactsAct
Action to show/hide contact visuals for all models.
QAction * g_newAct