ConfigWidget Class Reference

A widget generated from a google protobuf message. More...

#include <ConfigWidget.hh>

Inherits QWidget.

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 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 &_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 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...
 

Public Member Functions

 ConfigWidget ()
 Constructor. More...
 
 ~ConfigWidget ()
 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...
 
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...
 
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...
 
ConfigChildWidgetCreateColorWidget (const std::string &_key, const int _level=0)
 Create a widget for configuring a color value. More...
 
ConfigChildWidgetCreateDensityWidget (const std::string &_key, const int _level=0)
 Create a widget for setting a density 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...
 
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...
 
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 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...
 
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...
 
void InsertLayout (QLayout *_layout, int _pos)
 Insert a layout into the config widget's layout at a specific position. More...
 
int IntWidgetValue (const std::string &_name) const
 Get an integer value from a child widget. More...
 
void Load (const google::protobuf::Message *_msg)
 Load from a google protobuf message. More...
 
google::protobuf::Message * Msg ()
 Get the updated message. 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...
 
bool SetBoolWidgetValue (const std::string &_name, bool _value)
 Set a bool 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...
 
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...
 
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...
 
std::string StringWidgetValue (const std::string &_name) const
 Get a string value from a child widget. 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...
 

Static Public Member Functions

static std::string HumanReadableKey (const std::string &_key)
 Create a human readable key, capitalizing the first letter and removing characters like "_". 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...
 

Static Public Attributes

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...
 
static const QString greenColor
 Green color used for "green" or "y" fields. More...
 
static const QString redColor
 Red color used for "red" or "x" fields. More...
 
static const std::vector< QString > widgetColors
 List of colors used for widget areas according to their level. More...
 

Detailed Description

A widget generated from a google protobuf message.


The documentation for this class was generated from the following file: