GUI

The graphical user interface. More...

Files

file  GuiTypes.hh
 default namespace for gazebo
 
file  PlottingTypes.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  DensityConfigWidget
 A widget for configuring density properties. 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  ExportDialog
 Dialog for saving to file. 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  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  SaveEntityDialog
 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...
 
 DensityConfigWidget ()
 Constructor. More...
 
 EntityMaker ()
 Constructor. 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...
 
ignition::math::Color ColorWidgetValue (const std::string &_name) const
 Get a color value from a child widget. More...
 
ConfigChildWidget * ConfigChildWidgetByName (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...
 
ConfigChildWidget * CreateBoolWidget (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...
 
ConfigChildWidget * CreateColorWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a color value. More...
 
ConfigChildWidget * CreateDensityWidget (const std::string &_key, const int _level=0)
 Create a widget for setting a density value. More...
 
ConfigChildWidget * CreateDoubleWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a double value. More...
 
ConfigChildWidget * CreateEnumWidget (const std::string &_key, const std::vector< std::string > &_values, const int _level=0)
 Create a widget for configuring an enum value. More...
 
ConfigChildWidget * CreateGeometryWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a geometry value. More...
 
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. More...
 
ConfigChildWidget * CreateIntWidget (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...
 
ConfigChildWidget * CreatePoseWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a pose value. More...
 
ConfigChildWidget * CreateStringWidget (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...
 
ConfigChildWidget * CreateUIntWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring an unsigned integer value. More...
 
ConfigChildWidget * CreateVector3dWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a vector3 value. More...
 
double Density () const
 Accessor for the widget's density value. More...
 
double DensityWidgetValue (const std::string &_name) const
 Get a density value from a child widget. 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...
 
static std::string HumanReadableKey (const std::string &_key)
 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::ModelCreator * ModelCreator ()
 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) GAZEBO_DEPRECATED(9)
 Set a color value to a child widget. More...
 
bool SetColorWidgetValue (const std::string &_name, const ignition::math::Color &_value)
 Set a color value to a child widget. More...
 
void SetDensity (const double _density)
 Updates the widget's density value. More...
 
bool SetDensityWidgetValue (const std::string &_name, const double _value)
 Set a density 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 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 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...
 
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...
 
QComboBox * comboBox
 A combo box for selecting a material density. More...
 
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...
 
GroupWidget * groupWidget
 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...
 
QDoubleSpinBox * spinBox
 A spin box for entering a density value. 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 ignition::math::Color &_value)
 Signal that a color config widget's value has changed. More...
 
void DensityValueChanged (const double &_value)
 Signal emitted when density has changed. More...
 
void DensityValueChanged (const double &_value)
 Signal emitted when density value changes. 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 GeometryChanged ()
 Signal emitted when geometry changes. More...
 
void GeometryChanged ()
 Signal emitted when geometry changes. 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 MassValueChanged (const double &_value)
 Signal emitted when mass value changes. 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

#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 ( QWidget *  _parent = 0)
explicit

Constructor.

Parameters
[in]_parentParent widget pointer.
ConfigChildWidget ( )
inline

Constructor;.

ConfigWidget ( )

Constructor.

DensityConfigWidget ( )

Constructor.

EntityMaker ( )

Constructor.

ModelEditorPalette ( QWidget *  _parent = 0)
explicit

Constructor.

Parameters
[in]_parentParent QWidget.
ModelTreeWidget ( QWidget *  _parent = 0)
explicit

Constructor.

Parameters
[in]_parentParent QWidget.
OculusWindow ( int  _x,
int  _y,
const std::string &  _visual,
QWidget *  _parent = 0 
)

Constructor.

TerrainEditorPalette ( QWidget *  _parent = 0)
explicit

Constructor.

Parameters
[in]_parentParent QWidget.
virtual ~CloneWindow ( )
virtual

Destructor.

~ConfigWidget ( )

Destructor.

virtual ~EntityMaker ( )
virtual

Destructor.

~ModelEditorPalette ( )

Destructor.

~ModelTreeWidget ( )
default

Destructor.

virtual ~OculusWindow ( )
virtual

Destructor.

~TerrainEditorPalette ( )

Destructor.

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.
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.
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.
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.
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.
ignition::math::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.
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.
unsigned int ConfigChildWidgetCount ( ) const

Get the number of child widgets.

Returns
The number of child widgets.
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.
bool CreateCamera ( )

Initialize Oculus and create a camera.

Returns
True when Oculus is connected and the camera was created.
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.
ConfigChildWidget* CreateDensityWidget ( const std::string &  _key,
const int  _level = 0 
)

Create a widget for setting a density 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.
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.
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.
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.
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.
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.
void CreateJoint ( const std::string &  _type)

Add a joint to the model.

Parameters
[in]_typeType of joint to add.
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.
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.
virtual void CreateTheEntity ( )
protectedpure virtual

Creates the entity.

Implemented in LightMaker.

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.
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.
double Density ( ) const

Accessor for the widget's density value.

Returns
The density.
double DensityWidgetValue ( const std::string &  _name) const

Get a density value from a child widget.

Parameters
[in]_nameName of the child widget.
Returns
Density value.
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.
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.

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.
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.
static std::string HumanReadableKey ( const std::string &  _key)
static

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

Parameters
[in]_keyNon-human-readable key.
Returns
Human-readable key.
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.
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.
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.
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.
void keyPressEvent ( QKeyEvent *  _event)
protected
void Load ( const google::protobuf::Message *  _msg)

Load from a google protobuf message.

Parameters
[in]_msgMessage to load from.
gui::ModelCreator* ModelCreator ( )

Get the model creator.

Returns
a pointer to the model creator.
google::protobuf::Message* Msg ( )

Get the updated message.

Returns
Updated message.
virtual void OnMouseMove ( const common::MouseEvent _event)
virtual

Callback when moving mouse.

Parameters
[in]_eventMouseEvent object
virtual void OnMouseRelease ( const common::MouseEvent _event)
virtual

Callback when mouse button is released.

Parameters
[in]_eventMouseEvent object
int Port ( ) const

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

Returns
The port for the new gzserver.
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.
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.
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.
void RemoveWidget ( QWidget *  _widget)

Remove a widget from the model editor palette widget.

Parameters
[in]_widgetWidget to be added.
virtual void resizeEvent ( QResizeEvent *  _e)
protectedvirtual
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.
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.
Deprecated:
Use function which accepts ignition::math::Color
bool SetColorWidgetValue ( const std::string &  _name,
const ignition::math::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.
void SetDensity ( const double  _density)

Updates the widget's density value.

Parameters
[in]_densityNew density value.
bool SetDensityWidgetValue ( const std::string &  _name,
const double  _value 
)

Set a density value to a child widget.

Parameters
[in]_nameName of the child widget.
[in]_valueDensity value to set to.
Returns
True if the value is set successfully.
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.
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.

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.
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.
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.
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.
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.
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.
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.
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.
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.
virtual void showEvent ( QShowEvent *  _e)
protectedvirtual
virtual void Start ( )
virtual

Start the maker.

Reimplemented in LightMaker.

virtual void Stop ( )
virtual

Stop the maker.

Reimplemented in ModelMaker, and LightMaker.

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.
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.
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.
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.
void UpdateFromMsg ( const google::protobuf::Message *  _msg)

Update the widgets from a message.

Parameters
[in]_msgMessage used for updating the widgets.
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
ignition math Vector3d value.
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.
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

const std::vector<QString> bgColors
static

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

const QString blueColor
static

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

QWidget* childWidget

Child widget that can be collapsed or expanded.

QComboBox* comboBox

A combo box for selecting a material density.

QStackedWidget* geomDimensionWidget

A stacked widget containing widgets for configuring geometry dimensions.

QWidget* geomFilenameButton

A button for selecting the mesh filename.

QWidget* geomFilenameLabel

A label for the mesh filename widget.

QWidget* geomFilenameLineEdit

A line edit for editing the mesh filename.

QWidget* geomLengthLabel

A label for the length widget.

QWidget* geomLengthSpinBox

A spin box for configuring the length of the geometry.

QWidget* geomLengthUnitLabel

A label for the unit of the length widget.

const QString greenColor
static

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

GroupWidget* groupWidget

Pointer to group widget.

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

std::string key

Widget's key value.

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

Map a widget to the label holding its unit value.

const QString redColor
static

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

std::string scopedName

Widget's scoped name within parent config widget.

QDoubleSpinBox* spinBox

A spin box for entering a density value.

const std::vector<QString> widgetColors
static

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

std::vector<QWidget *> widgets

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

Signals

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.
void ColorValueChanged ( const QString &  _name,
const ignition::math::Color &  _value 
)
signal

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

Parameters
[in]_nameScoped name of widget.
[in]_valueNew color.
void DensityValueChanged ( const double &  _value)
signal

Signal emitted when density has changed.

Parameters
[in]_valueDensity value.
void DensityValueChanged ( const double &  _value)
signal

Signal emitted when density value changes.

Parameters
[in]_valueDensity value.
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.
void EnumValueChanged ( const QString &  _value)
signal

brief Signal an enum value change event.

Parameters
[in]_valueNew enum value in string.
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.
void GeometryChanged ( )
signal

Signal emitted when geometry changes.

void GeometryChanged ( )
signal

Signal emitted when geometry changes.

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.
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.
void MassValueChanged ( const double &  _value)
signal

Signal emitted when mass value changes.

Parameters
[in]_valueMass value.
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.
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.
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.
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.