17 #ifndef _MAINWINDOW_HH_
18 #define _MAINWINDOW_HH_
25 #include <boost/thread/mutex.hpp>
27 #include "gazebo/gazebo_config.h"
31 #include "gazebo/msgs/MessageTypes.hh"
45 class ModelListWidget;
59 public:
unsigned int GetEntityId(
const std::string &_name);
60 public:
bool HasEntityName(
const std::string &_name);
65 public:
void AddToLeftColumn(
const std::string &_name, QWidget *_widget);
72 public:
void ShowLeftColumnWidget(
const std::string &_name =
"default");
80 public:
bool IsPaused()
const;
83 public slots:
void Play();
86 public slots:
void Pause();
90 public:
void SetLeftPaneVisibility(
bool _on);
94 public:
void AddMenu(QMenu *_menu);
100 public:
void ShowMenuBar(QMenuBar *_bar =
NULL);
110 public: QAction *CloneAction(QAction *_action, QObject *_parent);
115 public:
Editor *GetEditor(
const std::string &_name)
const;
118 signals:
void AddPlugins();
121 signals:
void Close();
123 protected:
void closeEvent(QCloseEvent *_event);
125 private:
void OnGUI(ConstGUIPtr &_msg);
127 private slots:
void ItemSelected(QTreeWidgetItem *,
int);
128 private slots:
void New();
129 private slots:
void Open();
130 private slots:
void Import();
131 private slots:
void Save();
132 private slots:
void SaveAs();
135 private slots:
void SaveINI();
138 private slots:
void Clone();
140 private slots:
void About();
141 private slots:
void Step();
142 private slots:
void Arrow();
145 private slots:
void Translate();
148 private slots:
void Rotate();
151 private slots:
void Scale();
155 private slots:
void Align();
158 private slots:
void Snap();
160 private slots:
void CreateBox();
161 private slots:
void CreateSphere();
162 private slots:
void CreateCylinder();
163 private slots:
void CreateMesh();
164 private slots:
void CreatePointLight();
165 private slots:
void CreateSpotLight();
166 private slots:
void CreateDirectionalLight();
169 private slots:
void CaptureScreenshot();
171 private slots:
void InsertModel();
174 private slots:
void ShowGrid();
177 private slots:
void ShowOrigin();
180 private slots:
void ShowCollisions();
183 private slots:
void ShowJoints();
186 private slots:
void ShowContacts();
189 private slots:
void ShowCOM();
192 private slots:
void ShowInertia();
195 private slots:
void ShowLinkFrame();
198 private slots:
void FullScreen();
201 private slots:
void ShowToolbars();
203 private slots:
void FPS();
204 private slots:
void Orbit();
205 private slots:
void ViewOculus();
206 private slots:
void OnResetModelOnly();
207 private slots:
void OnResetWorld();
208 private slots:
void SetTransparent();
209 private slots:
void SetWireframe();
212 private slots:
void ShowGUIOverlays();
218 private slots:
void OnDataLoggerClosed();
221 private slots:
void SelectTopic();
227 private slots:
void OnAddPlugins();
231 private slots:
void OnEditorGroup(QAction *_action);
235 private:
void OnFullScreen(
bool _value);
239 private:
void OnShowToolbars(
bool _value);
241 private:
void OnMoveMode(
bool _mode);
244 private:
void CreateActions();
247 private:
void DeleteActions();
250 private:
void CreateMenus();
253 private:
void CreateMenuBar();
256 private:
void CreateEditors();
258 private:
void OnModel(ConstModelPtr &_msg);
262 private:
void OnLight(ConstLightPtr &_msg);
264 private:
void OnResponse(ConstResponsePtr &_msg);
265 private:
void OnWorldModify(ConstWorldModifyPtr &_msg);
266 private:
void OnManipMode(
const std::string &_mode);
267 private:
void OnSetSelectedEntity(
const std::string &_name,
268 const std::string &_mode);
272 private:
void OnInputStepSizeChanged(
int _value);
276 private:
void OnFollow(
const std::string &_modelName);
282 private:
void CreateDisabledIcon(
const std::string &_pixmap,
285 private: QToolBar *playToolbar;
304 private: QDockWidget *toolsDock;
306 private: std::vector<event::ConnectionPtr> connections;
309 private: std::map<std::string, unsigned int> entities;
312 private: msgs::Request *requestMsg;
315 private: QTabWidget *tabWidget;
318 private: QMenuBar *menuBar;
321 private: QMenu *editMenu;
324 private: QHBoxLayout *menuLayout;
327 private: QStackedWidget *leftColumn;
330 private: std::map<std::string, int> leftColumnStack;
334 private: std::string saveFilename;
337 private:
int inputStepSize;
340 private: std::map<std::string, Editor *> editors;
343 private: std::vector<QActionGroup *> alignActionGroups;
353 private: std::vector<boost::shared_ptr<msgs::Plugin const> > pluginMsgs;
356 private: boost::mutex pluginLoadMutex;
359 private: QSplitter *splitter;
A widget that provides data logging functionality.
Definition: DataLogger.hh:34
Interface to the space navigator joystick.
Definition: SpaceNav.hh:51
A widget that renders a camera view suitable for the Oculus Rift.
Definition: OculusWindow.hh:39
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Forward declarations for transport.
Plot diagnostic information.
Definition: gui/Diagnostics.hh:39
#define NULL
Definition: CommonTypes.hh:30
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
Definition: MainWindow.hh:49
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for editors, such as BuildingEditor and TerrainEditor.
Definition: Editor.hh:35
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66