GUI

The graphical user interface. More...

Files

file  GuiTypes.hh
 default namespace for gazebo
 

Namespaces

 gazebo::gui
 gui namespace
 

Classes

class  ApplyWrenchDialog
 Dialog for applying force and torque to a model. More...
 
class  BaseInspectorDialog
 Base Dialog for a specific inspector dialog. More...
 
class  BuildingEditorPalette
 A palette of building items which can be added to the editor. More...
 
class  BuildingEditorWidget
 The parent widget of the building editor, level widget and scale widget. More...
 
class  BuildingMaker
 Create and manage 3D visuals of a building. More...
 
class  BuildingModelManip
 Manipulate a 3D visual associated to a 2D editor item. More...
 
class  CloneWindow
 A dialog window used to set some parameters before cloning a simulation. More...
 
class  CollisionConfig
 A tab for configuring collision properties of a link. More...
 
class  CollisionConfigData
 A class of widgets used for configuring collision properties. More...
 
class  ConfigChildWidget
 A convenience widget that also holds pointers to a list of its child widgets. More...
 
class  ConfigWidget
 A widget generated from a google protobuf message. More...
 
class  Conversions
 Conversions Conversions.hh gui/Conversions.hh. More...
 
class  DataLogger
 A widget that provides data logging functionality. More...
 
class  DoorItem
 2D representation of a door More...
 
class  EditorItem
 Base class of an item in the editor. More...
 
class  EditorView
 Control the editor view and manage contents in the editor scene. More...
 
class  EntityMaker
 To make an entity, base class. More...
 
class  EnumConfigWidget
 A widget for configuring enum values. More...
 
class  ExtrudeDialog
 Dialog for saving to file. More...
 
class  FloorItem
 2D representation of a floor. More...
 
class  GeometryConfigWidget
 A widget for configuring geometry properties. More...
 
class  GridLines
 2D grid lines. More...
 
class  GroupWidget
 A collapsible widget that holds child widgets. More...
 
class  HotkeyDialog
 Dialog displaying the keyboard shortcuts. More...
 
class  ImportDialog
 Dialog for saving to file. More...
 
class  ImportImageDialog
 
class  ImportImageView
 Control the import image view and manage contents in the scene. More...
 
class  JointMaker
 Handles the creation of joints in the model editor. More...
 
class  LevelInspectorDialog
 Dialog for configuring a building level. More...
 
class  LevelWidget
 A widget for adding and changing building levels. More...
 
class  LinkConfig
 A tab for configuring properties of a link. More...
 
class  MeasureItem
 Measurement lines and values. More...
 
class  ModelCreator
 Create and manage 3D visuals of a model with links, nested models and joints. More...
 
class  ModelEditorPalette
 A palette of model items which can be added to the editor. More...
 
class  ModelPluginInspector
 Inspector for model plugin properties. More...
 
class  ModelTreeWidget
 A widget that displays model properties. More...
 
class  OculusWindow
 A widget that renders a camera view suitable for the Oculus Rift. More...
 
class  RectItem
 2D rectangle. More...
 
class  RotateHandle
 Handle for rotating an editor item. More...
 
class  SaveDialog
 Dialog for saving to file. More...
 
class  ScaleWidget
 Widget that displays the scale (zoom level) of the editor. More...
 
class  SegmentItem
 2D line segment. More...
 
class  StairsInspectorDialog
 Dialog for configuring a staircase item. More...
 
class  StairsItem
 2D representation of a staircase. More...
 
class  TerrainEditorPalette
 A palette of building items which can be added to the editor. More...
 
class  ToolsWidget
 A widget that manages all the tools on the right side of the render widget. More...
 
class  TopicSelector
 A widget that provides a list of topics to select from. More...
 
class  ViewFactory
 The view factory creates GUI widgets to visualize data on a topic. More...
 
class  VisualConfig
 A tab for configuring visual properties of a link. More...
 
class  VisualConfigData
 A class of widgets used for configuring visual properties. More...
 
class  WallInspectorDialog
 Dialog for configuring a wall item. More...
 
class  WallSegmentItem
 2D representation of a wall. More...
 
class  WindowDoorInspectorDialog
 Dialog for configuring a window or door item. More...
 
class  WindowItem
 2D representation of a window. More...
 

Macros

#define GZ_REGISTER_STATIC_VIEWER(msgtype, classname)
 Static view registration macro. More...
 

Functions

 CloneWindow (QWidget *_parent=0)
 Constructor. More...
 
 ConfigChildWidget ()
 Constructor;. More...
 
 ConfigWidget ()
 Constructor. More...
 
 EntityMaker (EntityMakerPrivate &_dataPtr)
 Constructor used by inherited classes. More...
 
 ModelEditorPalette (QWidget *_parent=0)
 Constructor. More...
 
 ModelTreeWidget (QWidget *_parent=0)
 Constructor. More...
 
 OculusWindow (int _x, int _y, const std::string &_visual, QWidget *_parent=0)
 Constructor. More...
 
 TerrainEditorPalette (QWidget *_parent=0)
 Constructor. More...
 
virtual ~CloneWindow ()
 Destructor. More...
 
 ~ConfigWidget ()
 Destructor. More...
 
virtual ~EntityMaker ()
 Destructor. More...
 
 ~ModelEditorPalette ()
 Destructor. More...
 
 ~ModelTreeWidget ()=default
 Destructor. More...
 
virtual ~OculusWindow ()
 Destructor. More...
 
 ~TerrainEditorPalette ()
 Destructor. More...
 
bool AddConfigChildWidget (const std::string &_name, ConfigChildWidget *_child)
 Register a child widget as a child of this widget, so it can be updated. More...
 
void AddItem (QWidget *_item, const std::string &_category="Other")
 Add an item to the model editor palette. More...
 
bool AddItemEnumWidget (const std::string &_name, const std::string &_itemText)
 Add an item to a child enum widget. More...
 
bool BoolWidgetValue (const std::string &_name) const
 Get a bool value from a child widget. More...
 
bool ClearEnumWidget (const std::string &_name)
 Remove all items from a child enum widget. More...
 
common::Color ColorWidgetValue (const std::string &_name) const
 Get a color value from a child widget. More...
 
ConfigChildWidgetConfigChildWidgetByName (const std::string &_name) const
 Get a config child widget by its name. More...
 
unsigned int ConfigChildWidgetCount () const
 Get the number of child widgets. More...
 
ConfigChildWidgetCreateBoolWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a bool value. More...
 
bool CreateCamera ()
 Initialize Oculus and create a camera. More...
 
ConfigChildWidgetCreateColorWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a color value. More...
 
ConfigChildWidgetCreateDoubleWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a double value. More...
 
ConfigChildWidgetCreateEnumWidget (const std::string &_key, const std::vector< std::string > &_values, const int _level=0)
 Create a widget for configuring an enum value. More...
 
ConfigChildWidgetCreateGeometryWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a geometry value. More...
 
GroupWidgetCreateGroupWidget (const std::string &_name, ConfigChildWidget *_childWidget, const int _level=0)
 Create a widget which has a button header which collapses the field widget. More...
 
ConfigChildWidgetCreateIntWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring an integer value. More...
 
void CreateJoint (const std::string &_type)
 Add a joint to the model. More...
 
ConfigChildWidgetCreatePoseWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a pose value. More...
 
ConfigChildWidgetCreateStringWidget (const std::string &_key, const int _level=0, const std::string &_type="line")
 Create a widget for configuring a string value. More...
 
virtual void CreateTheEntity ()=0
 Creates the entity. More...
 
ConfigChildWidgetCreateUIntWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring an unsigned integer value. More...
 
ConfigChildWidgetCreateVector3dWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a vector3 value. More...
 
double DoubleWidgetValue (const std::string &_name) const
 Get a double value from a child widget. More...
 
virtual ignition::math::Vector3d EntityPosition () const
 Returns the entity world position. More...
 
std::string EnumWidgetValue (const std::string &_name) const
 Get an enum value from a child widget. More...
 
std::string GeometryWidgetValue (const std::string &_name, ignition::math::Vector3d &_dimensions, std::string &_uri) const
 Get a geometry value from a child widget. More...
 
bool GetBoolWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get a bool value from a child widget. More...
 
common::Color GetColorWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get a color value from a child widget. More...
 
double GetDoubleWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get a double value from a child widget. More...
 
std::string GetEnumWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get an enum value from a child widget. More...
 
std::string GetGeometryWidgetValue (const std::string &_name, math::Vector3 &_dimensions, std::string &_uri) const GAZEBO_DEPRECATED(7.0)
 Get a geometry value from a child widget. More...
 
std::string GetHumanReadableKey (const std::string &_key) GAZEBO_DEPRECATED(7.0)
 Create a human readable key, capitalizing the first letter and removing characters like "_". More...
 
int GetIntWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get an integer value from a child widget. More...
 
google::protobuf::Message * GetMsg () GAZEBO_DEPRECATED(7.0)
 Get the updated message. More...
 
int GetPort () GAZEBO_DEPRECATED(7.0)
 Get the port for the new gzserver specified by the user. More...
 
math::Pose GetPoseWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get a pose value from a child widget. More...
 
void GetRangeFromKey (const std::string &_key, double &_min, double &_max) GAZEBO_DEPRECATED(7.0)
 Returns the range for a given key. More...
 
std::string GetStringWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get a string value from a child widget. More...
 
unsigned int GetUIntWidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get an unsigned integer value from a child widget. More...
 
std::string GetUnitFromKey (const std::string &_key, const std::string &_jointType="") GAZEBO_DEPRECATED(7.0)
 Returns the unit for a given key. More...
 
math::Vector3 GetVector3WidgetValue (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get a vector3 value from a child widget. More...
 
bool GetWidgetReadOnly (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get whether a child widget is read-only. More...
 
bool GetWidgetVisible (const std::string &_name) const GAZEBO_DEPRECATED(7.0)
 Get whether a child widget is visible. More...
 
std::string HumanReadableKey (const std::string &_key) const
 Create a human readable key, capitalizing the first letter and removing characters like "_". More...
 
void InsertLayout (QLayout *_layout, int _pos)
 Insert a layout into the config widget's layout at a specific position. More...
 
void InsertWidget (const unsigned int _index, QWidget *_widget)
 Add a widget inside the model editor palette widget. More...
 
int IntWidgetValue (const std::string &_name) const
 Get an integer value from a child widget. More...
 
bool IsValidPort () const
 True if the stored port is a valid one. More...
 
void keyPressEvent (QKeyEvent *_event)
 
void Load (const google::protobuf::Message *_msg)
 Load from a google protobuf message. More...
 
gui::ModelCreatorModelCreator ()
 Get the model creator. More...
 
google::protobuf::Message * Msg ()
 Get the updated message. More...
 
virtual void OnMouseMove (const common::MouseEvent &_event)
 Callback when moving mouse. More...
 
virtual void OnMouseRelease (const common::MouseEvent &_event)
 Callback when mouse button is released. More...
 
int Port () const
 Get the port for the new gzserver specified by the user. More...
 
ignition::math::Pose3d PoseWidgetValue (const std::string &_name) const
 Get a pose value from a child widget. More...
 
void RangeFromKey (const std::string &_key, double &_min, double &_max) const
 Returns the range for a given key. More...
 
bool RemoveItemEnumWidget (const std::string &_name, const std::string &_itemText)
 Remove an item from a child enum widget. More...
 
void RemoveWidget (QWidget *_widget)
 Remove a widget from the model editor palette widget. More...
 
virtual void resizeEvent (QResizeEvent *_e)
 
bool SetBoolWidgetValue (const std::string &_name, bool _value)
 Set a bool value to a child widget. More...
 
bool SetColorWidgetValue (const std::string &_name, const common::Color &_value)
 Set a color value to a child widget. More...
 
bool SetDoubleWidgetValue (const std::string &_name, double _value)
 Set a double value to a child widget. More...
 
virtual void SetEntityPosition (const ignition::math::Vector3d &_pos)
 Sets the entity world position. More...
 
bool SetEnumWidgetValue (const std::string &_name, const std::string &_value)
 Set an enum value to a child widget. More...
 
bool SetGeometryWidgetValue (const std::string &_name, const std::string &_value, const math::Vector3 &_dimensions, const std::string &_uri="") GAZEBO_DEPRECATED(7.0)
 Set a geometry value to a child widget. More...
 
bool SetGeometryWidgetValue (const std::string &_name, const std::string &_value, const ignition::math::Vector3d &_dimensions, const std::string &_uri="")
 Set a geometry value to a child widget. More...
 
bool SetIntWidgetValue (const std::string &_name, int _value)
 Set an integer value to a child widget. More...
 
bool SetPoseWidgetValue (const std::string &_name, const math::Pose &_value) GAZEBO_DEPRECATED(7.0)
 Set a pose value to a child widget. More...
 
bool SetPoseWidgetValue (const std::string &_name, const ignition::math::Pose3d &_value)
 Set a pose value to a child widget. More...
 
bool SetStringWidgetValue (const std::string &_name, const std::string &_value)
 Set a string value to a child widget. More...
 
bool SetUIntWidgetValue (const std::string &_name, unsigned int _value)
 Set an unsigned integer value to a child widget. More...
 
bool SetVector3dWidgetValue (const std::string &_name, const ignition::math::Vector3d &_value)
 Set a vector3 value to a child widget. More...
 
bool SetVector3WidgetValue (const std::string &_name, const math::Vector3 &_value) GAZEBO_DEPRECATED(7.0)
 Set a vector3 value to a child widget. More...
 
void SetWidgetReadOnly (const std::string &_name, bool _readOnly)
 Set whether a child widget should be read-only. More...
 
void SetWidgetVisible (const std::string &_name, bool _visible)
 Set whether a child widget should be visible. More...
 
virtual void showEvent (QShowEvent *_e)
 
virtual void Start ()
 Start the maker. More...
 
virtual void Stop ()
 Stop the maker. More...
 
std::string StringWidgetValue (const std::string &_name) const
 Get a string value from a child widget. More...
 
static QString StyleSheet (const std::string &_type, const int _level=0)
 Get a style sheet in string format, to be applied to a child config widget with setStyleSheet. More...
 
unsigned int UIntWidgetValue (const std::string &_name) const
 Get an unsigned integer value from a child widget. More...
 
std::string UnitFromKey (const std::string &_key, const std::string &_jointType="") const
 Returns the unit for a given key. More...
 
void UpdateFromMsg (const google::protobuf::Message *_msg)
 Update the widgets from a message. More...
 
ignition::math::Vector3d Vector3dWidgetValue (const std::string &_name) const
 Get a vector3 value from a child widget. More...
 
bool WidgetReadOnly (const std::string &_name) const
 Get whether a child widget is read-only. More...
 
bool WidgetVisible (const std::string &_name) const
 Get whether a child widget is visible. More...
 

Variables

static const std::vector< QString > bgColors
 List of colors used for the background of widgets according to their level. More...
 
static const QString blueColor
 Blue color used for "blue" or "z" fields. More...
 
QWidget * childWidget
 Child widget that can be collapsed or expanded. More...
 
EntityMakerPrivate * dataPtr
 
QStackedWidget * geomDimensionWidget
 A stacked widget containing widgets for configuring geometry dimensions. More...
 
QWidget * geomFilenameButton
 A button for selecting the mesh filename. More...
 
QWidget * geomFilenameLabel
 A label for the mesh filename widget. More...
 
QWidget * geomFilenameLineEdit
 A line edit for editing the mesh filename. More...
 
QWidget * geomLengthLabel
 A label for the length widget. More...
 
QWidget * geomLengthSpinBox
 A spin box for configuring the length of the geometry. More...
 
QWidget * geomLengthUnitLabel
 A label for the unit of the length widget. More...
 
static const QString greenColor
 Green color used for "green" or "y" fields. More...
 
GroupWidgetgroupWidget
 Pointer to group widget. More...
 
std::string key
 Widget's key value. More...
 
std::map< QWidget *, QLabel * > mapWidgetToUnit
 Map a widget to the label holding its unit value. More...
 
static const QString redColor
 Red color used for "red" or "x" fields. More...
 
std::string scopedName
 Widget's scoped name within parent config widget. More...
 
static const std::vector< QString > widgetColors
 List of colors used for widget areas according to their level. More...
 
std::vector< QWidget * > widgets
 List of widgets holding values, such as Spins and LineEdits. More...
 

Signals

void BoolValueChanged (const QString &_name, const bool _value)
 Signal that a bool config widget's value has changed. More...
 
void ColorValueChanged (const QString &_name, const gazebo::common::Color &_value)
 Signal that a color config widget's value has changed. More...
 
void DoubleValueChanged (const QString &_name, const double _value)
 Signal that a double config widget's value has changed. More...
 
void EnumValueChanged (const QString &_value)
 brief Signal an enum value change event. More...
 
void EnumValueChanged (const QString &_name, const QString &_value)
 Signal that an enum config widget's enum value has changed. More...
 
void GeometryValueChanged (const std::string &_name, const std::string &_value, const ignition::math::Vector3d &_dimensions, const std::string &_uri)
 Signal that a geometry config widget's value has changed. More...
 
void IntValueChanged (const QString &_name, const int _value)
 Signal that an int config widget's value has changed. More...
 
void PoseValueChanged (const QString &_name, const ignition::math::Pose3d &_pose)
 Signal that a pose config widget's value has changed. More...
 
void StringValueChanged (const QString &_name, const std::string &_value)
 Signal that a string config widget's value has changed. More...
 
void UIntValueChanged (const QString &_name, const unsigned int _value)
 Signal that a uint config widget's value has changed. More...
 
void Vector3dValueChanged (const QString &_name, const ignition::math::Vector3d &_value)
 Signal that a vector3 config widget's value has changed. More...
 

Detailed Description

The graphical user interface.

Macro Definition Documentation

§ GZ_REGISTER_STATIC_VIEWER

#define GZ_REGISTER_STATIC_VIEWER (   msgtype,
  classname 
)
Value:
TopicView *New##classname(QWidget *_parent) \
{ \
return new gazebo::gui::classname(_parent); \
} \
\
void Register##classname() \
{\
ViewFactory::RegisterView(msgtype, New##classname);\
}

Static view registration macro.

Use this macro to register views.

Parameters
[in]msgtypeType of message to visualize.
[in]classnameC++ class name for the view.

Function Documentation

§ CloneWindow()

CloneWindow ( QWidget *  _parent = 0)

Constructor.

Parameters
[in]_parentParent widget pointer.

§ ConfigChildWidget()

ConfigChildWidget ( )
inline

Constructor;.

§ ConfigWidget()

Constructor.

§ EntityMaker()

EntityMaker ( EntityMakerPrivate &  _dataPtr)
protected

Constructor used by inherited classes.

Parameters
[in]_dataPtrPointer to private data.

§ ModelEditorPalette()

ModelEditorPalette ( QWidget *  _parent = 0)

Constructor.

Parameters
[in]_parentParent QWidget.

§ ModelTreeWidget()

ModelTreeWidget ( QWidget *  _parent = 0)

Constructor.

Parameters
[in]_parentParent QWidget.

§ OculusWindow()

OculusWindow ( int  _x,
int  _y,
const std::string &  _visual,
QWidget *  _parent = 0 
)

Constructor.

§ TerrainEditorPalette()

TerrainEditorPalette ( QWidget *  _parent = 0)

Constructor.

Parameters
[in]_parentParent QWidget.

§ ~CloneWindow()

virtual ~CloneWindow ( )
virtual

Destructor.

§ ~ConfigWidget()

Destructor.

§ ~EntityMaker()

virtual ~EntityMaker ( )
virtual

Destructor.

§ ~ModelEditorPalette()

Destructor.

§ ~ModelTreeWidget()

~ModelTreeWidget ( )
default

Destructor.

§ ~OculusWindow()

virtual ~OculusWindow ( )
virtual

Destructor.

§ ~TerrainEditorPalette()

Destructor.

§ AddConfigChildWidget()

bool AddConfigChildWidget ( const std::string &  _name,
ConfigChildWidget _child 
)

Register a child widget as a child of this widget, so it can be updated.

Note that the widget is not automatically added to a layout.

Parameters
[in]_nameUnique name to indentify the child within this widget
[in]_childChild widget to be added. It doesn't need to be a ConfigChildWidget.
Returns
True if child successfully added.

§ AddItem()

void AddItem ( QWidget *  _item,
const std::string &  _category = "Other" 
)

Add an item to the model editor palette.

Parameters
[in]_Itemitem to add.
[in]_categoryCategory to add the item too.

§ AddItemEnumWidget()

bool AddItemEnumWidget ( const std::string &  _name,
const std::string &  _itemText 
)

Add an item to a child enum widget.

Parameters
[in]_nameName of the child widget.
[in]_itemTextEnum text value.
Returns
True if the item is added successfully.

§ BoolWidgetValue()

bool BoolWidgetValue ( const std::string &  _name) const

Get a bool value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Bool value.

§ ClearEnumWidget()

bool ClearEnumWidget ( const std::string &  _name)

Remove all items from a child enum widget.

Parameters
[in]_nameName of the child widget.
Returns
True if successful.

§ ColorWidgetValue()

common::Color ColorWidgetValue ( const std::string &  _name) const

Get a color value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Color value.

§ ConfigChildWidgetByName()

ConfigChildWidget* ConfigChildWidgetByName ( const std::string &  _name) const

Get a config child widget by its name.

Parameters
[in]_nameScoped name of the child widget.
Returns
The child widget with the given name or NULL if it wasn't found.

§ ConfigChildWidgetCount()

unsigned int ConfigChildWidgetCount ( ) const

Get the number of child widgets.

Returns
The number of child widgets.

§ CreateBoolWidget()

ConfigChildWidget* CreateBoolWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring a bool value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateCamera()

bool CreateCamera ( )

Initialize Oculus and create a camera.

Returns
True when Oculus is connected and the camera was created.

§ CreateColorWidget()

ConfigChildWidget* CreateColorWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring a color value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateDoubleWidget()

ConfigChildWidget* CreateDoubleWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring a double value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateEnumWidget()

ConfigChildWidget* CreateEnumWidget ( const std::string &  _key,
const std::vector< std::string > &  _values,
const int  _level = 0 
)

Create a widget for configuring an enum value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_valuesA list of enum values in string.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateGeometryWidget()

ConfigChildWidget* CreateGeometryWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring a geometry value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateGroupWidget()

GroupWidget* CreateGroupWidget ( const std::string &  _name,
ConfigChildWidget _childWidget,
const int  _level = 0 
)

Create a widget which has a button header which collapses the field widget.

Parameters
[in]_nameHeader name.
[out]_childWidgetWidget which will be collapsed.
[in]_levelLevel of the widget in the tree.
Returns
The group widget.

§ CreateIntWidget()

ConfigChildWidget* CreateIntWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring an integer value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateJoint()

void CreateJoint ( const std::string &  _type)

Add a joint to the model.

Parameters
[in]_typeType of joint to add.

§ CreatePoseWidget()

ConfigChildWidget* CreatePoseWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring a pose value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateStringWidget()

ConfigChildWidget* CreateStringWidget ( const std::string &  _key,
const int  _level = 0,
const std::string &  _type = "line" 
)

Create a widget for configuring a string value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
[in]_typeType of string widget, such as "line" or "plain".
Returns
The newly created widget.

§ CreateTheEntity()

virtual void CreateTheEntity ( )
protectedpure virtual

Creates the entity.

Implemented in LightMaker.

§ CreateUIntWidget()

ConfigChildWidget* CreateUIntWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring an unsigned integer value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ CreateVector3dWidget()

ConfigChildWidget* CreateVector3dWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for configuring a vector3 value.

Parameters
[in]_keyA key that is used as a label for the widget.
[in]_levelLevel of the widget in the tree.
Returns
The newly created widget.

§ DoubleWidgetValue()

double DoubleWidgetValue ( const std::string &  _name) const

Get a double value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Double value.

§ EntityPosition()

virtual ignition::math::Vector3d EntityPosition ( ) const
virtual

Returns the entity world position.

Returns
Entity's position in the world frame.

Reimplemented in ModelMaker, and LightMaker.

§ EnumWidgetValue()

std::string EnumWidgetValue ( const std::string &  _name) const

Get an enum value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Enum value.

§ GeometryWidgetValue()

std::string GeometryWidgetValue ( const std::string &  _name,
ignition::math::Vector3d &  _dimensions,
std::string &  _uri 
) const

Get a geometry value from a child widget.

Parameters
[in]_nameName of the child widget.
[out]_dimensionsDimensions of geometry.
[out]_uriURI of the geometry mesh, if any.
Returns
Type of geometry.

§ GetBoolWidgetValue()

bool GetBoolWidgetValue ( const std::string &  _name) const

Get a bool value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Bool value.
Deprecated:
See BoolWidgetValue(const std::string &_name) const

§ GetColorWidgetValue()

common::Color GetColorWidgetValue ( const std::string &  _name) const

Get a color value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Color value.
Deprecated:
See ColorWidgetValue(const std::string &_name) const

§ GetDoubleWidgetValue()

double GetDoubleWidgetValue ( const std::string &  _name) const

Get a double value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Double value.
Deprecated:
See DoubleWidgetValue(const std::string &_name) const

§ GetEnumWidgetValue()

std::string GetEnumWidgetValue ( const std::string &  _name) const

Get an enum value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Enum value.
Deprecated:
See EnumWidgetValue(const std::string &_name)

§ GetGeometryWidgetValue()

std::string GetGeometryWidgetValue ( const std::string &  _name,
math::Vector3 _dimensions,
std::string &  _uri 
) const

Get a geometry value from a child widget.

Parameters
[in]_nameName of the child widget.
[out]_dimensionsDimensions of geometry.
[out]_uriURI of the geometry mesh, if any.
Returns
Type of geometry.
Deprecated:
See GeometryWidgetValue() function that accepts an ignition math object.

§ GetHumanReadableKey()

std::string GetHumanReadableKey ( const std::string &  _key)

Create a human readable key, capitalizing the first letter and removing characters like "_".

Parameters
[in]_keyNon-human-readable key.
Returns
Human-readable key.
Deprecated:
See HumanReadableKey(const std::string &_key) const

§ GetIntWidgetValue()

int GetIntWidgetValue ( const std::string &  _name) const

Get an integer value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Integer value.
Deprecated:
See IntWidgetValue(const std::string &_name) const

§ GetMsg()

google::protobuf::Message* GetMsg ( )

Get the updated message.

Returns
Updated message.
Deprecated:
See Msg().

§ GetPort()

int GetPort ( )

Get the port for the new gzserver specified by the user.

Returns
The port for the new gzserver.
Deprecated:
See Port() const

§ GetPoseWidgetValue()

math::Pose GetPoseWidgetValue ( const std::string &  _name) const

Get a pose value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Pose value.
Deprecated:
See PoseWidgetValue(const std::string &_name) const

§ GetRangeFromKey()

void GetRangeFromKey ( const std::string &  _key,
double &  _min,
double &  _max 
)

Returns the range for a given key.

For example, the key "transparency" returns min == 0, max == 1.

Parameters
[in]_keyThe key.
[out]_minThe minimum value.
[out]_maxThe maximum value.
Deprecated:
See RangeFromKey(const std::string &_key, double &_min, double &_max) const

§ GetStringWidgetValue()

std::string GetStringWidgetValue ( const std::string &  _name) const

Get a string value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
String value.
Deprecated:
See StringWidgetValue(const std::string &_name) const

§ GetUIntWidgetValue()

unsigned int GetUIntWidgetValue ( const std::string &  _name) const

Get an unsigned integer value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Unsigned integer value.
Deprecated:
See UIntWidgetValue(const std::string &_name) const

§ GetUnitFromKey()

std::string GetUnitFromKey ( const std::string &  _key,
const std::string &  _jointType = "" 
)

Returns the unit for a given key.

For example, the key "mass" returns "kg".

Parameters
[in]_keyThe key.
[in]_jointTypeIn case the field belongs to a joint, the joint's type.
Returns
The unit.
Deprecated:
See UnitFromKey(const std::string &_key, const std::string &_jointType = "") const

§ GetVector3WidgetValue()

math::Vector3 GetVector3WidgetValue ( const std::string &  _name) const

Get a vector3 value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Vector3 value.
Deprecated:
See Vector3dWidgetValue(const std::string &_name) const

§ GetWidgetReadOnly()

bool GetWidgetReadOnly ( const std::string &  _name) const

Get whether a child widget is read-only.

Parameters
[in]_nameName of the child widget.
Returns
True if the widget is read-only.
Deprecated:
See WidgetReadOnly(const std::string &_name) const

§ GetWidgetVisible()

bool GetWidgetVisible ( const std::string &  _name) const

Get whether a child widget is visible.

Parameters
[in]_nameName of the child widget.
Returns
True if the widget is visible.
Deprecated:
See WidgetVisible(const std::string &_name) const

§ HumanReadableKey()

std::string HumanReadableKey ( const std::string &  _key) const

Create a human readable key, capitalizing the first letter and removing characters like "_".

Parameters
[in]_keyNon-human-readable key.
Returns
Human-readable key.

§ InsertLayout()

void InsertLayout ( QLayout *  _layout,
int  _pos 
)

Insert a layout into the config widget's layout at a specific position.

Parameters
[in]_layoutThe layout to be inserted.
[in]_posThe position to insert at, 0 being the top.

§ InsertWidget()

void InsertWidget ( const unsigned int  _index,
QWidget *  _widget 
)

Add a widget inside the model editor palette widget.

Parameters
[in]_indexIndex in the splitter to insert the widget at.
[in]_widgetWidget to be added.

§ IntWidgetValue()

int IntWidgetValue ( const std::string &  _name) const

Get an integer value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Integer value.

§ IsValidPort()

bool IsValidPort ( ) const

True if the stored port is a valid one.

A valid port is an integer number in the 1025-65535 range.

Returns
True when the port is valid or false otherwise.

§ keyPressEvent()

void keyPressEvent ( QKeyEvent *  _event)
protected

§ Load()

void Load ( const google::protobuf::Message *  _msg)

Load from a google protobuf message.

Parameters
[in]_msgMessage to load from.

§ ModelCreator()

Get the model creator.

Returns
a pointer to the model creator.

§ Msg()

google::protobuf::Message* Msg ( )

Get the updated message.

Returns
Updated message.

§ OnMouseMove()

virtual void OnMouseMove ( const common::MouseEvent _event)
virtual

Callback when moving mouse.

Parameters
[in]_eventMouseEvent object

§ OnMouseRelease()

virtual void OnMouseRelease ( const common::MouseEvent _event)
virtual

Callback when mouse button is released.

Parameters
[in]_eventMouseEvent object

§ Port()

int Port ( ) const

Get the port for the new gzserver specified by the user.

Returns
The port for the new gzserver.

§ PoseWidgetValue()

ignition::math::Pose3d PoseWidgetValue ( const std::string &  _name) const

Get a pose value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Pose value.

§ RangeFromKey()

void RangeFromKey ( const std::string &  _key,
double &  _min,
double &  _max 
) const

Returns the range for a given key.

For example, the key "transparency" returns min == 0, max == 1.

Parameters
[in]_keyThe key.
[out]_minThe minimum value.
[out]_maxThe maximum value.

§ RemoveItemEnumWidget()

bool RemoveItemEnumWidget ( const std::string &  _name,
const std::string &  _itemText 
)

Remove an item from a child enum widget.

Parameters
[in]_nameName of the child widget.
[in]_itemTextText of the enum value.
Returns
True if the item is removed successfully.

§ RemoveWidget()

void RemoveWidget ( QWidget *  _widget)

Remove a widget from the model editor palette widget.

Parameters
[in]_widgetWidget to be added.

§ resizeEvent()

virtual void resizeEvent ( QResizeEvent *  _e)
protectedvirtual

§ SetBoolWidgetValue()

bool SetBoolWidgetValue ( const std::string &  _name,
bool  _value 
)

Set a bool value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetColorWidgetValue()

bool SetColorWidgetValue ( const std::string &  _name,
const common::Color _value 
)

Set a color value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetDoubleWidgetValue()

bool SetDoubleWidgetValue ( const std::string &  _name,
double  _value 
)

Set a double value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetEntityPosition()

virtual void SetEntityPosition ( const ignition::math::Vector3d &  _pos)
protectedvirtual

Sets the entity world position.

Parameters
[in]_posNew position in the world frame.

Reimplemented in ModelMaker, and LightMaker.

§ SetEnumWidgetValue()

bool SetEnumWidgetValue ( const std::string &  _name,
const std::string &  _value 
)

Set an enum value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetGeometryWidgetValue() [1/2]

bool SetGeometryWidgetValue ( const std::string &  _name,
const std::string &  _value,
const math::Vector3 _dimensions,
const std::string &  _uri = "" 
)

Set a geometry value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueType of geometry.
[in]_dimensionsDimensions of geometry.
Returns
True if the value is set successfully.
Deprecated:
See SetGeometryWidgetValue(const std::string &_name, const std::string &_value, const ignition::math::Vector3d &_dimensions, const std::string &_uri = "")

§ SetGeometryWidgetValue() [2/2]

bool SetGeometryWidgetValue ( const std::string &  _name,
const std::string &  _value,
const ignition::math::Vector3d &  _dimensions,
const std::string &  _uri = "" 
)

Set a geometry value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueType of geometry.
[in]_dimensionsDimensions of geometry.
Returns
True if the value is set successfully.

§ SetIntWidgetValue()

bool SetIntWidgetValue ( const std::string &  _name,
int  _value 
)

Set an integer value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetPoseWidgetValue() [1/2]

bool SetPoseWidgetValue ( const std::string &  _name,
const math::Pose _value 
)

Set a pose value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.
Deprecated:
See SetPoseWidgetValue(const std::string &_name, const ignition::math::Pose3d &_value)

§ SetPoseWidgetValue() [2/2]

bool SetPoseWidgetValue ( const std::string &  _name,
const ignition::math::Pose3d &  _value 
)

Set a pose value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetStringWidgetValue()

bool SetStringWidgetValue ( const std::string &  _name,
const std::string &  _value 
)

Set a string value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.

§ SetUIntWidgetValue()

bool SetUIntWidgetValue ( const std::string &  _name,
unsigned int  _value 
)

Set an unsigned integer value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetVector3dWidgetValue()

bool SetVector3dWidgetValue ( const std::string &  _name,
const ignition::math::Vector3d &  _value 
)

Set a vector3 value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.

§ SetVector3WidgetValue()

bool SetVector3WidgetValue ( const std::string &  _name,
const math::Vector3 _value 
)

Set a vector3 value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueValue to set to.
Returns
True if the value is set successfully.
Deprecated:
See SetVector3dWidgetValue(const std::string &_name, const ignition::math::Vector3 &_value)

§ SetWidgetReadOnly()

void SetWidgetReadOnly ( const std::string &  _name,
bool  _readOnly 
)

Set whether a child widget should be read-only.

Parameters
[in]_nameName of the child widget.
[in]_visibleTrue to set the widget to be read-only.

§ SetWidgetVisible()

void SetWidgetVisible ( const std::string &  _name,
bool  _visible 
)

Set whether a child widget should be visible.

Parameters
[in]_nameName of the child widget.
[in]_visibleTrue to set the widget to be visible.

§ showEvent()

virtual void showEvent ( QShowEvent *  _e)
protectedvirtual

§ Start()

virtual void Start ( )
virtual

Start the maker.

Reimplemented in LightMaker.

§ Stop()

virtual void Stop ( )
virtual

Stop the maker.

Reimplemented in ModelMaker, and LightMaker.

§ StringWidgetValue()

std::string StringWidgetValue ( const std::string &  _name) const

Get a string value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
String value.

§ StyleSheet()

static QString StyleSheet ( const std::string &  _type,
const int  _level = 0 
)
static

Get a style sheet in string format, to be applied to a child config widget with setStyleSheet.

Parameters
[in]_typeType of style sheet, such as "warning", "active", "normal".
[in]_levelLevel of widget in the tree.
Returns
Style sheet as string. Returns an empty string if _type is unknown.

§ UIntWidgetValue()

unsigned int UIntWidgetValue ( const std::string &  _name) const

Get an unsigned integer value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Unsigned integer value.

§ UnitFromKey()

std::string UnitFromKey ( const std::string &  _key,
const std::string &  _jointType = "" 
) const

Returns the unit for a given key.

For example, the key "mass" returns "kg".

Parameters
[in]_keyThe key.
[in]_jointTypeIn case the field belongs to a joint, the joint's type.
Returns
The unit.

§ UpdateFromMsg()

void UpdateFromMsg ( const google::protobuf::Message *  _msg)

Update the widgets from a message.

Parameters
[in]_msgMessage used for updating the widgets.

§ Vector3dWidgetValue()

ignition::math::Vector3d Vector3dWidgetValue ( const std::string &  _name) const

Get a vector3 value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Vector3 value.

§ WidgetReadOnly()

bool WidgetReadOnly ( const std::string &  _name) const

Get whether a child widget is read-only.

Parameters
[in]_nameName of the child widget.
Returns
True if the widget is read-only.

§ WidgetVisible()

bool WidgetVisible ( const std::string &  _name) const

Get whether a child widget is visible.

Parameters
[in]_nameName of the child widget.
Returns
True if the widget is visible.

Variable Documentation

§ bgColors

const std::vector<QString> bgColors
static

List of colors used for the background of widgets according to their level.

§ blueColor

const QString blueColor
static

Blue color used for "blue" or "z" fields.

§ childWidget

QWidget* childWidget

Child widget that can be collapsed or expanded.

§ dataPtr

EntityMakerPrivate* dataPtr
protected

§ geomDimensionWidget

QStackedWidget* geomDimensionWidget

A stacked widget containing widgets for configuring geometry dimensions.

§ geomFilenameButton

QWidget* geomFilenameButton

A button for selecting the mesh filename.

§ geomFilenameLabel

QWidget* geomFilenameLabel

A label for the mesh filename widget.

§ geomFilenameLineEdit

QWidget* geomFilenameLineEdit

A line edit for editing the mesh filename.

§ geomLengthLabel

QWidget* geomLengthLabel

A label for the length widget.

§ geomLengthSpinBox

QWidget* geomLengthSpinBox

A spin box for configuring the length of the geometry.

§ geomLengthUnitLabel

QWidget* geomLengthUnitLabel

A label for the unit of the length widget.

§ greenColor

const QString greenColor
static

Green color used for "green" or "y" fields.

§ groupWidget

GroupWidget* groupWidget

Pointer to group widget.

NULL if this widget is not contained inside a group widget.

§ key

std::string key

Widget's key value.

§ mapWidgetToUnit

std::map<QWidget *, QLabel *> mapWidgetToUnit

Map a widget to the label holding its unit value.

§ redColor

const QString redColor
static

Red color used for "red" or "x" fields.

§ scopedName

std::string scopedName

Widget's scoped name within parent config widget.

§ widgetColors

const std::vector<QString> widgetColors
static

List of colors used for widget areas according to their level.

§ widgets

std::vector<QWidget *> widgets

List of widgets holding values, such as Spins and LineEdits.

Signals

§ BoolValueChanged

void BoolValueChanged ( const QString &  _name,
const bool  _value 
)
signal

Signal that a bool config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew bool.

§ ColorValueChanged

void ColorValueChanged ( const QString &  _name,
const gazebo::common::Color _value 
)
signal

Signal that a color config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew color.

§ DoubleValueChanged

void DoubleValueChanged ( const QString &  _name,
const double  _value 
)
signal

Signal that a double config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew double.

§ EnumValueChanged [1/2]

void EnumValueChanged ( const QString &  _value)
signal

brief Signal an enum value change event.

Parameters
[in]_valueNew enum value in string.

§ EnumValueChanged [2/2]

void EnumValueChanged ( const QString &  _name,
const QString &  _value 
)
signal

Signal that an enum config widget's enum value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew enum value string.

§ GeometryValueChanged

void GeometryValueChanged ( const std::string &  _name,
const std::string &  _value,
const ignition::math::Vector3d &  _dimensions,
const std::string &  _uri 
)
signal

Signal that a geometry config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew geometry name, such as "box".
[in]_dimensionsNew dimensions.
[in]_uriNew uri, for meshes.

§ IntValueChanged

void IntValueChanged ( const QString &  _name,
const int  _value 
)
signal

Signal that an int config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew int.

§ PoseValueChanged

void PoseValueChanged ( const QString &  _name,
const ignition::math::Pose3d &  _pose 
)
signal

Signal that a pose config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_poseNew pose.

§ StringValueChanged

void StringValueChanged ( const QString &  _name,
const std::string &  _value 
)
signal

Signal that a string config widget's value has changed.

Note that only single line widgets will emit signals, so plain text widgets don't emit signals.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew string.

§ UIntValueChanged

void UIntValueChanged ( const QString &  _name,
const unsigned int  _value 
)
signal

Signal that a uint config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew uint.

§ Vector3dValueChanged

void Vector3dValueChanged ( const QString &  _name,
const ignition::math::Vector3d &  _value 
)
signal

Signal that a vector3 config widget's value has changed.

Parameters
[in]_nameScoped name of widget.
[in]_valueNew vector3.