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
DeleteAction(const QString &_text, QObject *_parent)
Constructor.
Definition: Actions.hh:145
QAction * g_viewAngleButtonAct
Action attached to the view angle button.
QAction * g_resetModelsAct
QAction * g_translateAct
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
Forward declarations for the common classes.
Definition: Animation.hh:33
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:139
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_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:150
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