ConfigWidget.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef _GAZEBO_GUI_CONFIGWIDGET_HH_
19 #define _GAZEBO_GUI_CONFIGWIDGET_HH_
20 
21 #include <map>
22 #include <memory>
23 #include <string>
24 #include <vector>
25 
26 #include <ignition/math/Color.hh>
27 #include <ignition/math/Pose3.hh>
28 #include <ignition/math/Vector3.hh>
29 
30 #include "gazebo/common/Color.hh"
31 #include "gazebo/gui/qt.h"
32 
33 namespace google
34 {
35  namespace protobuf
36  {
37  class Message;
38  class Reflection;
39  class FieldDescriptor;
40  }
41 }
42 
43 namespace gazebo
44 {
45  namespace gui
46  {
47  class ConfigWidgetPrivate;
48  class GroupWidget;
49 
52 
56  class GZ_GUI_VISIBLE ConfigChildWidget : public QFrame
57  {
58  Q_OBJECT
59 
61  public: ConfigChildWidget() : groupWidget(NULL) {}
62 
64  public: std::string key;
65 
67  public: std::string scopedName;
68 
70  public: std::vector<QWidget *> widgets;
71 
73  public: std::map<QWidget *, QLabel *> mapWidgetToUnit;
74 
78  };
79 
82  class GZ_GUI_VISIBLE GeometryConfigWidget : public ConfigChildWidget
83  {
84  Q_OBJECT
85 
88  public: QStackedWidget *geomDimensionWidget;
89 
91  public: QWidget *geomLengthSpinBox;
92 
94  public: QWidget *geomLengthLabel;
95 
97  public: QWidget *geomLengthUnitLabel;
98 
100  public: QWidget *geomFilenameLineEdit;
101 
103  public: QWidget *geomFilenameLabel;
104 
106  public: QWidget *geomFilenameButton;
107 
110  private slots: void OnGeometryTypeChanged(const QString &_text);
111 
114  private slots: void OnGeometrySizeChanged(const double _value);
115 
117  private slots: void OnSelectFile();
118 
120  Q_SIGNALS: void GeometryChanged();
121  };
122 
125  class GZ_GUI_VISIBLE DensityConfigWidget : public ConfigChildWidget
126  {
127  Q_OBJECT
128 
130  public: DensityConfigWidget();
131 
134  public: void SetDensity(const double _density);
135 
138  public: double Density() const;
139 
142  private slots: void OnComboBoxChanged(const QString &_text);
143 
146  private slots: void OnSpinBoxChanged(const QString &_text);
147 
150  Q_SIGNALS: void DensityValueChanged(const double &_value);
151 
153  public: QComboBox *comboBox;
154 
156  public: QDoubleSpinBox *spinBox;
157 
159  private: double density;
160  };
161 
164  class GZ_GUI_VISIBLE EnumConfigWidget : public ConfigChildWidget
165  {
166  Q_OBJECT
167 
170  Q_SIGNALS: void EnumValueChanged(const QString &_value);
171 
174  private slots: void EnumChanged(const QString &_value);
175  };
176 
179  class GZ_GUI_VISIBLE GroupWidget : public QWidget
180  {
181  Q_OBJECT
182 
184  public: QWidget *childWidget;
185 
188  private slots: void Toggle(bool _checked);
189  };
190 
193  class GZ_GUI_VISIBLE ConfigWidget : public QWidget
194  {
195  Q_OBJECT
196 
198  public: ConfigWidget();
199 
201  public: ~ConfigWidget();
202 
205  public: void Load(const google::protobuf::Message *_msg);
206 
209  public: google::protobuf::Message *Msg();
210 
215  public: static std::string HumanReadableKey(const std::string &_key);
216 
223  public: std::string UnitFromKey(const std::string &_key,
224  const std::string &_jointType = "") const;
225 
231  public: void RangeFromKey(const std::string &_key,
232  double &_min, double &_max) const;
233 
237  public: void SetWidgetVisible(const std::string &_name, bool _visible);
238 
242  public: bool WidgetVisible(const std::string &_name) const;
243 
247  public: void SetWidgetReadOnly(const std::string &_name, bool _readOnly);
248 
252  public: bool WidgetReadOnly(const std::string &_name) const;
253 
256  public: void UpdateFromMsg(const google::protobuf::Message *_msg);
257 
262  public: bool SetIntWidgetValue(const std::string &_name, int _value);
263 
268  public: bool SetUIntWidgetValue(const std::string &_name, unsigned int
269  _value);
270 
275  public: bool SetDoubleWidgetValue(const std::string &_name,
276  double _value);
277 
282  public: bool SetBoolWidgetValue(const std::string &_name, bool _value);
283 
287  public: bool SetStringWidgetValue(const std::string &_name,
288  const std::string &_value);
289 
294  public: bool SetVector3dWidgetValue(const std::string &_name,
295  const ignition::math::Vector3d &_value);
296 
302  public: bool SetColorWidgetValue(const std::string &_name,
303  const common::Color &_value) GAZEBO_DEPRECATED(9);
304 
309  public: bool SetColorWidgetValue(const std::string &_name,
310  const ignition::math::Color &_value);
311 
316  public: bool SetPoseWidgetValue(const std::string &_name,
317  const ignition::math::Pose3d &_value);
318 
324  public: bool SetGeometryWidgetValue(const std::string &_name,
325  const std::string &_value,
326  const ignition::math::Vector3d &_dimensions,
327  const std::string &_uri = "");
328 
333  public: bool SetDensityWidgetValue(const std::string &_name,
334  const double _value);
335 
340  public: bool SetEnumWidgetValue(const std::string &_name,
341  const std::string &_value);
342 
347  public: bool AddItemEnumWidget(const std::string &_name,
348  const std::string &_itemText);
349 
354  public: bool RemoveItemEnumWidget(const std::string &_name,
355  const std::string &_itemText);
356 
360  public: bool ClearEnumWidget(const std::string &_name);
361 
365  public: int IntWidgetValue(const std::string &_name) const;
366 
370  public: unsigned int UIntWidgetValue(const std::string &_name) const;
371 
375  public: double DoubleWidgetValue(const std::string &_name) const;
376 
380  public: bool BoolWidgetValue(const std::string &_name) const;
381 
385  public: std::string StringWidgetValue(const std::string &_name) const;
386 
390  public: ignition::math::Vector3d Vector3dWidgetValue(
391  const std::string &_name) const;
392 
396  public: ignition::math::Color ColorWidgetValue(
397  const std::string &_name) const;
398 
402  public: ignition::math::Pose3d PoseWidgetValue(
403  const std::string &_name) const;
404 
410  public: std::string GeometryWidgetValue(const std::string &_name,
411  ignition::math::Vector3d &_dimensions, std::string &_uri) const;
412 
416  public: double DensityWidgetValue(const std::string &_name) const;
417 
421  public: std::string EnumWidgetValue(const std::string &_name) const;
422 
429  public: GroupWidget *CreateGroupWidget(const std::string &_name,
430  ConfigChildWidget *_childWidget, const int _level = 0);
431 
436  public: ConfigChildWidget *CreateUIntWidget(const std::string &_key,
437  const int _level = 0);
438 
443  public: ConfigChildWidget *CreateIntWidget(const std::string &_key,
444  const int _level = 0);
445 
450  public: ConfigChildWidget *CreateDoubleWidget(const std::string &_key,
451  const int _level = 0);
452 
458  public: ConfigChildWidget *CreateStringWidget(const std::string &_key,
459  const int _level = 0, const std::string &_type = "line");
460 
465  public: ConfigChildWidget *CreateBoolWidget(const std::string &_key,
466  const int _level = 0);
467 
472  public: ConfigChildWidget *CreateVector3dWidget(const std::string &_key,
473  const int _level = 0);
474 
479  public: ConfigChildWidget *CreateColorWidget(const std::string &_key,
480  const int _level = 0);
481 
486  public: ConfigChildWidget *CreatePoseWidget(const std::string &_key,
487  const int _level = 0);
488 
493  public: ConfigChildWidget *CreateGeometryWidget(const std::string &_key,
494  const int _level = 0);
495 
501  public: ConfigChildWidget *CreateEnumWidget(const std::string &_key,
502  const std::vector<std::string> &_values, const int _level = 0);
503 
508  public: ConfigChildWidget *CreateDensityWidget(const std::string &_key,
509  const int _level = 0);
510 
518  public: bool AddConfigChildWidget(const std::string &_name,
519  ConfigChildWidget *_child);
520 
525  public: void InsertLayout(QLayout *_layout, int _pos);
526 
531  public: ConfigChildWidget *ConfigChildWidgetByName(
532  const std::string &_name) const;
533 
536  public: unsigned int ConfigChildWidgetCount() const;
537 
545  public: static QString StyleSheet(const std::string &_type,
546  const int _level = 0);
547 
550  public: static const std::vector<QString> bgColors;
551 
553  public: static const std::vector<QString> widgetColors;
554 
556  public: static const QString redColor;
557 
559  public: static const QString greenColor;
560 
562  public: static const QString blueColor;
563 
573  private: QWidget *Parse(google::protobuf::Message *_msg,
574  bool _update = false, const std::string &_name = "",
575  const int _level = 0);
576 
580  private: ignition::math::Vector3d ParseVector3d(
581  const google::protobuf::Message *_msg) const;
582 
586  private: void UpdateMsg(google::protobuf::Message *_msg,
587  const std::string &_name = "");
588 
593  private: void UpdateVector3dMsg(google::protobuf::Message *_msg,
594  const ignition::math::Vector3d &_value);
595 
600  private: bool UpdateUIntWidget(ConfigChildWidget *_widget,
601  const unsigned int _value);
602 
607  private: bool UpdateIntWidget(ConfigChildWidget *_widget,
608  const int _value);
609 
614  private: bool UpdateDoubleWidget(ConfigChildWidget *_widget,
615  const double _value);
616 
621  private: bool UpdateStringWidget(ConfigChildWidget *_widget,
622  const std::string &_value);
623 
628  private: bool UpdateBoolWidget(ConfigChildWidget *_widget,
629  const bool _value);
630 
635  private: bool UpdateVector3dWidget(ConfigChildWidget *_widget,
636  const ignition::math::Vector3d &_value);
637 
642  private: bool UpdateColorWidget(ConfigChildWidget *_widget,
643  const ignition::math::Color &_value);
644 
649  private: bool UpdatePoseWidget(ConfigChildWidget *_widget,
650  const ignition::math::Pose3d &_value);
651 
658  private: bool UpdateGeometryWidget(ConfigChildWidget *_widget,
659  const std::string &_value,
660  const ignition::math::Vector3d &_dimensions,
661  const std::string &_uri = "");
662 
667  private: bool UpdateEnumWidget(ConfigChildWidget *_widget,
668  const std::string &_value);
669 
674  private: bool UpdateDensityWidget(ConfigChildWidget *_widget,
675  const double _value);
676 
680  private: int IntWidgetValue(ConfigChildWidget *_widget) const;
681 
685  private: unsigned int UIntWidgetValue(ConfigChildWidget *_widget) const;
686 
690  private: double DoubleWidgetValue(ConfigChildWidget *_widget) const;
691 
695  private: bool BoolWidgetValue(ConfigChildWidget *_widget) const;
696 
700  private: std::string StringWidgetValue(ConfigChildWidget *_widget) const;
701 
705  private: ignition::math::Vector3d Vector3dWidgetValue(
706  ConfigChildWidget *_widget) const;
707 
711  private: ignition::math::Color ColorWidgetValue(
712  ConfigChildWidget *_widget) const;
713 
717  private: ignition::math::Pose3d PoseWidgetValue(
718  ConfigChildWidget *_widget) const;
719 
725  private: std::string GeometryWidgetValue(ConfigChildWidget *_widget,
726  ignition::math::Vector3d &_dimensions, std::string &_uri) const;
727 
731  private: std::string EnumWidgetValue(ConfigChildWidget *_widget) const;
732 
736  private slots: void OnItemSelection(QTreeWidgetItem *_item,
737  const int _column);
738 
740  private slots: void OnUIntValueChanged();
741 
743  private slots: void OnIntValueChanged();
744 
746  private slots: void OnDoubleValueChanged();
747 
749  private slots: void OnBoolValueChanged();
750 
752  private slots: void OnStringValueChanged();
753 
755  private slots: void OnVector3dValueChanged();
756 
759  private slots: void OnVector3dPresetChanged(const int _index);
760 
762  private slots: void OnColorValueChanged();
763 
767  private slots: void OnColorValueChanged(const QColor _value);
768 
770  private slots: void OnPoseValueChanged();
771 
773  private slots: void OnGeometryValueChanged();
774 
777  private slots: void OnGeometryValueChanged(const int _value);
778 
781  private slots: void OnEnumValueChanged(const QString &_value);
782 
785  private slots: void OnCustomColorDialog();
786 
790  Q_SIGNALS: void UIntValueChanged(const QString &_name,
791  const unsigned int _value);
792 
796  Q_SIGNALS: void IntValueChanged(const QString &_name, const int _value);
797 
801  Q_SIGNALS: void DoubleValueChanged(const QString &_name,
802  const double _value);
803 
807  Q_SIGNALS: void BoolValueChanged(const QString &_name,
808  const bool _value);
809 
815  Q_SIGNALS: void StringValueChanged(const QString &_name,
816  const std::string &_value);
817 
821  Q_SIGNALS: void Vector3dValueChanged(const QString &_name,
822  const ignition::math::Vector3d &_value);
823 
827  Q_SIGNALS: void ColorValueChanged(const QString &_name,
828  const ignition::math::Color &_value);
829 
833  Q_SIGNALS: void PoseValueChanged(const QString &_name,
834  const ignition::math::Pose3d &_pose);
835 
841  Q_SIGNALS: void GeometryValueChanged(const std::string &_name,
842  const std::string &_value,
843  const ignition::math::Vector3d &_dimensions,
844  const std::string &_uri);
845 
849  Q_SIGNALS: void EnumValueChanged(const QString &_name,
850  const QString &_value);
851 
854  Q_SIGNALS: void DensityValueChanged(const double &_value);
855 
858  Q_SIGNALS: void MassValueChanged(const double &_value);
859 
862  private slots: void OnDensityValueChanged(const double _value);
863 
866  private slots: void OnMassValueChanged(const double _value);
867 
869  private slots: void OnGeometryChanged();
870 
872  Q_SIGNALS: void GeometryChanged();
873 
878  private: bool eventFilter(QObject *_obj, QEvent *_event);
879 
882  private: std::unique_ptr<ConfigWidgetPrivate> dataPtr;
883  };
884  }
885 }
886 #endif
bool RemoveItemEnumWidget(const std::string &_name, const std::string &_itemText)
Remove an item from a child enum 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.
void MassValueChanged(const double &_value)
Signal emitted when mass value changes.
void Vector3dValueChanged(const QString &_name, const ignition::math::Vector3d &_value)
Signal that a vector3 config widget's value has changed.
A widget for configuring geometry properties.
Definition: ConfigWidget.hh:82
ConfigChildWidget * CreateDoubleWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a double value.
Forward declarations for the common classes.
Definition: Animation.hh:26
bool SetBoolWidgetValue(const std::string &_name, bool _value)
Set a bool value to a child widget.
std::string key
Widget's key value.
Definition: ConfigWidget.hh:64
void PoseValueChanged(const QString &_name, const ignition::math::Pose3d &_pose)
Signal that a pose config widget's value has changed.
#define NULL
Definition: CommonTypes.hh:31
static std::string HumanReadableKey(const std::string &_key)
Create a human readable key, capitalizing the first letter and removing characters like "_".
void SetWidgetReadOnly(const std::string &_name, bool _readOnly)
Set whether a child widget should be read-only.
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.
std::vector< QWidget * > widgets
List of widgets holding values, such as Spins and LineEdits.
Definition: ConfigWidget.hh:70
A widget for configuring density properties.
Definition: ConfigWidget.hh:125
ignition::math::Vector3d Vector3dWidgetValue(const std::string &_name) const
Get a vector3 value from a child widget.
bool SetDensityWidgetValue(const std::string &_name, const double _value)
Set a density value to a child widget.
bool SetDoubleWidgetValue(const std::string &_name, double _value)
Set a double value to a child widget.
bool WidgetReadOnly(const std::string &_name) const
Get whether a child widget is read-only.
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.
QComboBox * comboBox
A combo box for selecting a material density.
Definition: ConfigWidget.hh:153
ConfigWidget()
Constructor.
void SetWidgetVisible(const std::string &_name, bool _visible)
Set whether a child widget should be visible.
bool WidgetVisible(const std::string &_name) const
Get whether a child widget is visible.
ConfigChildWidget * ConfigChildWidgetByName(const std::string &_name) const
Get a config child widget by its name.
void InsertLayout(QLayout *_layout, int _pos)
Insert a layout into the config widget's layout at a specific position.
void RangeFromKey(const std::string &_key, double &_min, double &_max) const
Returns the range for a given key.
double Density() const
Accessor for the widget's density value.
bool SetVector3dWidgetValue(const std::string &_name, const ignition::math::Vector3d &_value)
Set a vector3 value to a child widget.
double DoubleWidgetValue(const std::string &_name) const
Get a double value from a child widget.
A widget for configuring enum values.
Definition: ConfigWidget.hh:164
int IntWidgetValue(const std::string &_name) const
Get an integer value from a child widget.
ConfigChildWidget * CreateDensityWidget(const std::string &_key, const int _level=0)
Create a widget for setting a density value.
ConfigChildWidget * CreateUIntWidget(const std::string &_key, const int _level=0)
Create a widget for configuring an unsigned integer value.
QWidget * geomLengthUnitLabel
A label for the unit of the length widget.
Definition: ConfigWidget.hh:97
bool SetStringWidgetValue(const std::string &_name, const std::string &_value)
Set a string value to a child widget.
bool SetUIntWidgetValue(const std::string &_name, unsigned int _value)
Set an unsigned integer value to a child widget.
void BoolValueChanged(const QString &_name, const bool _value)
Signal that a bool config widget's value has changed.
QWidget * childWidget
Child widget that can be collapsed or expanded.
Definition: ConfigWidget.hh:184
bool SetEnumWidgetValue(const std::string &_name, const std::string &_value)
Set an enum value to a child widget.
static const QString greenColor
Green color used for "green" or "y" fields.
Definition: ConfigWidget.hh:559
void EnumValueChanged(const QString &_name, const QString &_value)
Signal that an enum config widget's enum value has changed.
A convenience widget that also holds pointers to a list of its child widgets.
Definition: ConfigWidget.hh:56
void IntValueChanged(const QString &_name, const int _value)
Signal that an int config widget's value has changed.
QWidget * geomFilenameLineEdit
A line edit for editing the mesh filename.
Definition: ConfigWidget.hh:100
void DensityValueChanged(const double &_value)
Signal emitted when density has changed.
static const std::vector< QString > bgColors
List of colors used for the background of widgets according to their level.
Definition: ConfigWidget.hh:550
QWidget * geomFilenameButton
A button for selecting the mesh filename.
Definition: ConfigWidget.hh:106
QStackedWidget * geomDimensionWidget
A stacked widget containing widgets for configuring geometry dimensions.
Definition: ConfigWidget.hh:88
void GeometryChanged()
Signal emitted when geometry changes.
ConfigChildWidget * CreatePoseWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a pose value.
ignition::math::Pose3d PoseWidgetValue(const std::string &_name) const
Get a pose value from a child widget.
std::string EnumWidgetValue(const std::string &_name) const
Get an enum value from a child widget.
bool AddItemEnumWidget(const std::string &_name, const std::string &_itemText)
Add an item to a child enum widget.
bool AddConfigChildWidget(const std::string &_name, ConfigChildWidget *_child)
Register a child widget as a child of this widget, so it can be updated.
bool ClearEnumWidget(const std::string &_name)
Remove all items from a child enum widget.
void UpdateFromMsg(const google::protobuf::Message *_msg)
Update the widgets from a message.
A collapsible widget that holds child widgets.
Definition: ConfigWidget.hh:179
double DensityWidgetValue(const std::string &_name) const
Get a density value from a child widget.
std::string scopedName
Widget's scoped name within parent config widget.
Definition: ConfigWidget.hh:67
static const QString redColor
Red color used for "red" or "x" fields.
Definition: ConfigWidget.hh:556
bool SetPoseWidgetValue(const std::string &_name, const ignition::math::Pose3d &_value)
Set a pose value to a child widget.
void ColorValueChanged(const QString &_name, const ignition::math::Color &_value)
Signal that a color config widget's value has changed.
ConfigChildWidget * CreateColorWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a color value.
QWidget * geomFilenameLabel
A label for the mesh filename widget.
Definition: ConfigWidget.hh:103
ConfigChildWidget()
Constructor;.
Definition: ConfigWidget.hh:61
QDoubleSpinBox * spinBox
A spin box for entering a density value.
Definition: ConfigWidget.hh:156
Defines a color.
Definition: Color.hh:36
ConfigChildWidget * CreateIntWidget(const std::string &_key, const int _level=0)
Create a widget for configuring an integer value.
QWidget * geomLengthSpinBox
A spin box for configuring the length of the geometry.
Definition: ConfigWidget.hh:91
GroupWidget * groupWidget
Pointer to group widget.
Definition: ConfigWidget.hh:77
bool SetColorWidgetValue(const std::string &_name, const common::Color &_value) GAZEBO_DEPRECATED(9)
Set a color value to a child widget.
bool BoolWidgetValue(const std::string &_name) const
Get a bool value from a child 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.
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
unsigned int ConfigChildWidgetCount() const
Get the number of child widgets.
void DoubleValueChanged(const QString &_name, const double _value)
Signal that a double config widget's value has changed.
~ConfigWidget()
Destructor.
void Load(const google::protobuf::Message *_msg)
Load from a google protobuf message.
ignition::math::Color ColorWidgetValue(const std::string &_name) const
Get a color value from a child widget.
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.
unsigned int UIntWidgetValue(const std::string &_name) const
Get an unsigned integer value from a child widget.
A widget generated from a google protobuf message.
Definition: ConfigWidget.hh:193
DensityConfigWidget()
Constructor.
google::protobuf::Message * Msg()
Get the updated message.
std::string StringWidgetValue(const std::string &_name) const
Get a string value from a child widget.
ConfigChildWidget * CreateBoolWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a bool value.
bool SetIntWidgetValue(const std::string &_name, int _value)
Set an integer value to a child widget.
void EnumValueChanged(const QString &_value)
brief Signal an enum value change event.
void StringValueChanged(const QString &_name, const std::string &_value)
Signal that a string config widget's value has changed.
void SetDensity(const double _density)
Updates the widget's density value.
ConfigChildWidget * CreateGeometryWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a geometry value.
std::map< QWidget *, QLabel * > mapWidgetToUnit
Map a widget to the label holding its unit value.
Definition: ConfigWidget.hh:73
QWidget * geomLengthLabel
A label for the length widget.
Definition: ConfigWidget.hh:94
ConfigChildWidget * CreateVector3dWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a vector3 value.
std::string UnitFromKey(const std::string &_key, const std::string &_jointType="") const
Returns the unit for a given key.
std::string GeometryWidgetValue(const std::string &_name, ignition::math::Vector3d &_dimensions, std::string &_uri) const
Get a geometry value from a child widget.
static const QString blueColor
Blue color used for "blue" or "z" fields.
Definition: ConfigWidget.hh:562
Definition: ConfigWidget.hh:33
ConfigChildWidget * CreateStringWidget(const std::string &_key, const int _level=0, const std::string &_type="line")
Create a widget for configuring a string value.
void UIntValueChanged(const QString &_name, const unsigned int _value)
Signal that a uint config widget's value has changed.
static const std::vector< QString > widgetColors
List of colors used for widget areas according to their level.
Definition: ConfigWidget.hh:553