##

RenderWidget.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_GUI_RENDERWIDGET_HH_
#define GAZEBO_GUI_RENDERWIDGET_HH_
#include <string>
#include <vector>
#include <sdf/sdf.hh>
#include "gazebo/gui/qt.h"
#include "gazebo/common/Event.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace gui
{
class TopToolbar;
class GLWidget;
class TimePanel;
class GZ_GUI_VISIBLE RenderWidget : public QWidget
{
Q_OBJECT
public: explicit RenderWidget(QWidget *_parent = 0);
public: virtual ~RenderWidget();
// \brief Initialization
public: void Init();
public: void RemoveScene(const std::string &_name);
public: void CreateScene(const std::string &_name);
public: void InsertWidget(unsigned int _index, QWidget *_widget);
public: void ShowTimePanel(bool _show);
public: TimePanel *GetTimePanel() const;
public: void DisplayOverlayMsg(const std::string &_msg,
int _duration = -1);
public: void SetOverlaysVisible(const bool _visible);
public: std::string GetOverlayMsg() const;
public: void AddPlugin(GUIPluginPtr _plugin, sdf::ElementPtr _elem);
public: bool AddPlugin(const std::string &_filename,
sdf::ElementPtr _elem);
public: void AddPlugins(const std::vector<std::string> &_pluginFilenames);
public: TopToolbar *GetToolbar() const;
public: void ShowToolbar(const bool _show);
private slots: void OnClearOverlayMsg();
private: void OnFullScreen(bool &_value);
private: void OnFollow(const std::string &_modelName);
private: GLWidget *glWidget;
private: QFrame *mainFrame;
private: std::vector<event::ConnectionPtr> connections;
private: QFrame *bottomFrame;
private: TopToolbar *topToolbar;
private: QLabel *msgOverlayLabel = nullptr;
private: std::string baseOverlayMsg;
private: QSplitter *splitter;
private: std::vector<gazebo::GUIPluginPtr> plugins;
private: TimePanel *timePanel;
};
}
}
#endif
gazebo::gui::RenderWidget::AddPlugins
void AddPlugins(const std::vector< std::string > &_pluginFilenames)
Add a list of plugins to be loaded from files.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::RenderWidget
Definition: RenderWidget.hh:37
gazebo::gui::RenderWidget::InsertWidget
void InsertWidget(unsigned int _index, QWidget *_widget)
Add a widget inside the render widget.
gazebo::gui::RenderWidget::CreateScene
void CreateScene(const std::string &_name)
gazebo::gui::RenderWidget::SetOverlaysVisible
void SetOverlaysVisible(const bool _visible)
Show or hide all the GUI overlays.
system.hh
gazebo::gui::RenderWidget::ShowToolbar
void ShowToolbar(const bool _show)
Set the visibility of the toolbar.
gazebo::gui::RenderWidget::RenderWidget
RenderWidget(QWidget *_parent=0)
gazebo::gui::RenderWidget::GetTimePanel
TimePanel * GetTimePanel() const
Get the time panel widget.
gazebo::gui::RenderWidget::AddPlugin
void AddPlugin(GUIPluginPtr _plugin, sdf::ElementPtr _elem)
Add a plugin to the render widget and call GUIPlugin::Load().
gazebo::gui::RenderWidget::GetOverlayMsg
std::string GetOverlayMsg() const
Get the overlay message being displayed.
gazebo::gui::TopToolbar
Toolbar on the top of the main window.
Definition: TopToolbar.hh:32
gazebo::gui::RenderWidget::DisplayOverlayMsg
void DisplayOverlayMsg(const std::string &_msg, int _duration=-1)
Display an overlay message.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::GUIPluginPtr
boost::shared_ptr< GUIPlugin > GUIPluginPtr
Definition: CommonTypes.hh:62
gazebo::gui::RenderWidget::Init
void Init()
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::GLWidget
Definition: GLWidget.hh:40
gazebo::gui::RenderWidget::~RenderWidget
virtual ~RenderWidget()
gazebo::gui::RenderWidget::GetToolbar
TopToolbar * GetToolbar() const
Get the toolbar on top of the render widget.
Event.hh
gazebo::gui::RenderWidget::RemoveScene
void RemoveScene(const std::string &_name)
gazebo::gui::TimePanel
Definition: TimePanel.hh:44
gazebo::gui::RenderWidget::ShowTimePanel
void ShowTimePanel(bool _show)
Show the time panel.