Actions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 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_importAct;
32  extern GZ_GUI_VISIBLE QAction *g_saveAct;
33  extern GZ_GUI_VISIBLE QAction *g_saveAsAct;
34  extern GZ_GUI_VISIBLE QAction *g_saveCfgAct;
35  extern GZ_GUI_VISIBLE QAction *g_cloneAct;
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_meshCreateAct;
55  extern GZ_GUI_VISIBLE QAction *g_pointLghtCreateAct;
56  extern GZ_GUI_VISIBLE QAction *g_spotLghtCreateAct;
57  extern GZ_GUI_VISIBLE QAction *g_dirLghtCreateAct;
58 
59  extern GZ_GUI_VISIBLE QAction *g_screenshotAct;
60 
62  extern GZ_GUI_VISIBLE QAction *g_showCollisionsAct;
63 
65  extern GZ_GUI_VISIBLE QAction *g_showGridAct;
66 
68  extern GZ_GUI_VISIBLE QAction *g_showOriginAct;
69 
71  extern GZ_GUI_VISIBLE QAction *g_showContactsAct;
72 
74  extern GZ_GUI_VISIBLE QAction *g_showJointsAct;
75 
77  extern GZ_GUI_VISIBLE QAction *g_showCOMAct;
78 
80  extern GZ_GUI_VISIBLE QAction *g_showInertiaAct;
81 
83  extern GZ_GUI_VISIBLE QAction *g_showLinkFrameAct;
84 
85  extern GZ_GUI_VISIBLE QAction *g_transparentAct;
86 
87  extern GZ_GUI_VISIBLE QAction *g_resetAct;
88  extern GZ_GUI_VISIBLE QAction *g_showToolbarsAct;
89  extern GZ_GUI_VISIBLE QAction *g_fullScreenAct;
90  extern GZ_GUI_VISIBLE QAction *g_fpsAct;
91  extern GZ_GUI_VISIBLE QAction *g_orbitAct;
92  extern GZ_GUI_VISIBLE QAction *g_overlayAct;
93 
94  extern GZ_GUI_VISIBLE QAction *g_arrowAct;
95  extern GZ_GUI_VISIBLE QAction *g_translateAct;
96  extern GZ_GUI_VISIBLE QAction *g_rotateAct;
97  extern GZ_GUI_VISIBLE QAction *g_scaleAct;
98 
99  extern GZ_GUI_VISIBLE QAction *g_topicVisAct;
100 
101  extern GZ_GUI_VISIBLE QAction *g_diagnosticsAct;
102 
103  extern GZ_GUI_VISIBLE QAction *g_viewWireframeAct;
104 
105  extern GZ_GUI_VISIBLE QAction *g_viewOculusAct;
106 
108  extern GZ_GUI_VISIBLE QAction *g_cameraOrthoAct;
109 
111  extern GZ_GUI_VISIBLE QAction *g_cameraPerspectiveAct;
112 
113  extern GZ_GUI_VISIBLE QAction *g_copyAct;
114  extern GZ_GUI_VISIBLE QAction *g_pasteAct;
115 
116  extern GZ_GUI_VISIBLE QWidgetAction *g_alignAct;
117  extern GZ_GUI_VISIBLE QAction *g_alignButtonAct;
118  extern GZ_GUI_VISIBLE QAction *g_snapAct;
119 
121  extern GZ_GUI_VISIBLE QWidgetAction *g_viewAngleAct;
122 
124  extern GZ_GUI_VISIBLE QAction *g_viewAngleButtonAct;
125 
128  class GAZEBO_VISIBLE DeleteAction : public QAction
129  {
130  Q_OBJECT
134  public: DeleteAction(const QString &_text, QObject *_parent)
135  : QAction(_text, _parent) {}
136 
139  public: void Signal(const std::string &_modelName)
140  { emit DeleteSignal(_modelName); }
141 
144  Q_SIGNALS: void DeleteSignal(const std::string &_modelName);
145  };
146 
148  extern GZ_GUI_VISIBLE DeleteAction *g_deleteAct;
149  }
150 }
151 #endif
GZ_GUI_VISIBLE QAction * g_spotLghtCreateAct
GZ_GUI_VISIBLE QAction * g_overlayAct
GZ_GUI_VISIBLE QAction * g_topicVisAct
GZ_GUI_VISIBLE QAction * g_meshCreateAct
GZ_GUI_VISIBLE QAction * g_stepAct
void Signal(const std::string &_modelName)
Emit the delete signal.
Definition: Actions.hh:139
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:368
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_importAct
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_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_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:128
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_editModelAct
GZ_GUI_VISIBLE QAction * g_showLinkFrameAct
Action to show/hide link frame visuals for all models.
GZ_GUI_VISIBLE QAction * g_rotateAct
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66
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:134