Actions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 
84  extern GZ_GUI_VISIBLE QAction *g_transparentAct;
85 
86  extern GZ_GUI_VISIBLE QAction *g_resetAct;
87  extern GZ_GUI_VISIBLE QAction *g_showToolbarsAct;
88  extern GZ_GUI_VISIBLE QAction *g_fullScreenAct;
89  extern GZ_GUI_VISIBLE QAction *g_fpsAct;
90  extern GZ_GUI_VISIBLE QAction *g_orbitAct;
91  extern GZ_GUI_VISIBLE QAction *g_overlayAct;
92 
93  extern GZ_GUI_VISIBLE QAction *g_arrowAct;
94  extern GZ_GUI_VISIBLE QAction *g_translateAct;
95  extern GZ_GUI_VISIBLE QAction *g_rotateAct;
96  extern GZ_GUI_VISIBLE QAction *g_scaleAct;
97 
98  extern GZ_GUI_VISIBLE QAction *g_topicVisAct;
99 
100  extern GZ_GUI_VISIBLE QAction *g_diagnosticsAct;
101 
102  extern GZ_GUI_VISIBLE QAction *g_viewWireframeAct;
103 
104  extern GZ_GUI_VISIBLE QAction *g_viewOculusAct;
105 
107  extern GZ_GUI_VISIBLE QAction *g_cameraOrthoAct;
108 
110  extern GZ_GUI_VISIBLE QAction *g_cameraPerspectiveAct;
111 
112  extern GZ_GUI_VISIBLE QAction *g_copyAct;
113  extern GZ_GUI_VISIBLE QAction *g_pasteAct;
114 
115  extern GZ_GUI_VISIBLE QWidgetAction *g_alignAct;
116  extern GZ_GUI_VISIBLE QAction *g_alignButtonAct;
117  extern GZ_GUI_VISIBLE QAction *g_snapAct;
118 
120  extern GZ_GUI_VISIBLE QWidgetAction *g_viewAngleAct;
121 
123  extern GZ_GUI_VISIBLE QAction *g_viewAngleButtonAct;
124 
126  extern GZ_GUI_VISIBLE QAction *g_undoAct;
127 
129  extern GZ_GUI_VISIBLE QAction *g_redoAct;
130 
132  extern GZ_GUI_VISIBLE QAction *g_undoHistoryAct;
133 
135  extern GZ_GUI_VISIBLE QAction *g_redoHistoryAct;
136 
139  class GZ_GUI_VISIBLE DeleteAction : public QAction
140  {
141  Q_OBJECT
145  public: DeleteAction(const QString &_text, QObject *_parent)
146  : QAction(_text, _parent) {}
147 
150  public: void Signal(const std::string &_modelName)
151  { emit DeleteSignal(_modelName); }
152 
155  Q_SIGNALS: void DeleteSignal(const std::string &_modelName);
156  };
157 
159  extern GZ_GUI_VISIBLE DeleteAction *g_deleteAct;
160  }
161 }
162 #endif
GZ_GUI_VISIBLE QAction * g_spotLghtCreateAct
GZ_GUI_VISIBLE QAction * g_overlayAct
GZ_GUI_VISIBLE QAction * g_topicVisAct
GZ_GUI_VISIBLE QAction * g_stepAct
void Signal(const std::string &_modelName)
Emit the delete signal.
Definition: Actions.hh:150
GZ_GUI_VISIBLE QAction * g_fullScreenAct
GZ_GUI_VISIBLE QAction * g_showInertiaAct
Action to show/hide inertia visuals for all models.
GZ_GUI_VISIBLE QAction * g_aboutAct
GZ_GUI_VISIBLE QAction * g_arrowAct
GZ_GUI_VISIBLE DeleteAction * g_deleteAct
Action used to delete a model.
#define GZ_GUI_VISIBLE
Definition: system.hh:284
GZ_GUI_VISIBLE QAction * g_resetAct
GZ_GUI_VISIBLE QAction * g_pointLghtCreateAct
GZ_GUI_VISIBLE QAction * g_showJointsAct
Action to show/hide joint visuals for all models.
GZ_GUI_VISIBLE QAction * g_cylinderCreateAct
GZ_GUI_VISIBLE QAction * g_pasteAct
GZ_GUI_VISIBLE QAction * g_cameraOrthoAct
Enable orthographic projection action.
GZ_GUI_VISIBLE QAction * g_showOriginAct
Action to show/hide the world origin indicator.
GZ_GUI_VISIBLE QAction * g_boxCreateAct
GZ_GUI_VISIBLE QAction * g_redoHistoryAct
Action to open the redo history menu.
GZ_GUI_VISIBLE QWidgetAction * g_viewAngleAct
Action to open the view angle widget.
GZ_GUI_VISIBLE QAction * g_editBuildingAct
GZ_GUI_VISIBLE QAction * g_saveAct
GZ_GUI_VISIBLE QAction * g_transparentAct
GZ_GUI_VISIBLE QAction * g_orbitAct
GZ_GUI_VISIBLE QAction * g_dirLghtCreateAct
GZ_GUI_VISIBLE QAction * g_newAct
GZ_GUI_VISIBLE QAction * g_copyAct
GZ_GUI_VISIBLE QAction * g_redoAct
Action to redo last undone user command.
GZ_GUI_VISIBLE QAction * g_showToolbarsAct
GZ_GUI_VISIBLE QAction * g_diagnosticsAct
GZ_GUI_VISIBLE QAction * g_quitAct
GZ_GUI_VISIBLE QAction * g_alignButtonAct
GZ_GUI_VISIBLE QAction * g_playAct
GZ_GUI_VISIBLE QAction * g_editTerrainAct
GZ_GUI_VISIBLE QAction * g_hotkeyChartAct
GZ_GUI_VISIBLE QAction * g_openAct
GZ_GUI_VISIBLE QAction * g_saveAsAct
GZ_GUI_VISIBLE QAction * g_viewAngleButtonAct
Action attached to the view angle button.
GZ_GUI_VISIBLE QAction * g_cameraPerspectiveAct
Enable perspective projection action.
Custom delete action.
Definition: Actions.hh:139
GZ_GUI_VISIBLE QAction * g_fpsAct
GZ_GUI_VISIBLE QAction * g_screenshotAct
GZ_GUI_VISIBLE QWidgetAction * g_alignAct
GZ_GUI_VISIBLE QAction * g_saveCfgAct
GZ_GUI_VISIBLE QAction * g_viewWireframeAct
GZ_GUI_VISIBLE QAction * g_resetModelsAct
GZ_GUI_VISIBLE QAction * g_cloneAct
GZ_GUI_VISIBLE QAction * g_pauseAct
GZ_GUI_VISIBLE QAction * g_dataLoggerAct
GZ_GUI_VISIBLE QAction * g_snapAct
GZ_GUI_VISIBLE QAction * g_showCOMAct
Action to show/hide CoM visuals for all models.
GZ_GUI_VISIBLE QAction * g_showContactsAct
Action to show/hide contact visuals for all models.
GZ_GUI_VISIBLE QAction * g_translateAct
GZ_GUI_VISIBLE QAction * g_viewOculusAct
GZ_GUI_VISIBLE QAction * g_showGridAct
Action to show/hide the grid over the ground plane.
GZ_GUI_VISIBLE QAction * g_sphereCreateAct
GZ_GUI_VISIBLE QAction * g_undoAct
Action to undo last user command.
GZ_GUI_VISIBLE QAction * g_editModelAct
GZ_GUI_VISIBLE QAction * g_showLinkFrameAct
Action to show/hide link frame visuals for all models.
GZ_GUI_VISIBLE QAction * g_undoHistoryAct
Action to open the undo history menu.
GZ_GUI_VISIBLE QAction * g_rotateAct
GZ_GUI_VISIBLE QAction * g_showCollisionsAct
Action to show/hide collision visuals for all models.
GZ_GUI_VISIBLE QAction * g_scaleAct
GZ_GUI_VISIBLE QAction * g_resetWorldAct
DeleteAction(const QString &_text, QObject *_parent)
Constructor.
Definition: Actions.hh:145