##

ConfigWidget.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _GAZEBO_GUI_CONFIGWIDGET_HH_
#define _GAZEBO_GUI_CONFIGWIDGET_HH_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <ignition/math/Color.hh>
#include <ignition/math/Pose3.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/common/Color.hh"
#include "gazebo/gui/qt.h"
namespace google
{
namespace protobuf
{
class Message;
class Reflection;
class FieldDescriptor;
}
}
namespace gazebo
{
namespace gui
{
class ConfigWidgetPrivate;
class GroupWidget;
class GZ_GUI_VISIBLE ConfigChildWidget : public QFrame
{
Q_OBJECT
public: ConfigChildWidget() : groupWidget(NULL) {}
public: std::string key;
public: std::string scopedName;
public: std::vector<QWidget *> widgets;
public: std::map<QWidget *, QLabel *> mapWidgetToUnit;
public: GroupWidget *groupWidget;
};
class GZ_GUI_VISIBLE GeometryConfigWidget : public ConfigChildWidget
{
Q_OBJECT
public: QStackedWidget *geomDimensionWidget;
public: QWidget *geomLengthSpinBox;
public: QWidget *geomLengthLabel;
public: QWidget *geomLengthUnitLabel;
public: QWidget *geomFilenameLineEdit;
public: QWidget *geomFilenameLabel;
public: QWidget *geomFilenameButton;
private slots: void OnGeometryTypeChanged(const QString &_text);
private slots: void OnGeometrySizeChanged(const double _value);
private slots: void OnSelectFile();
Q_SIGNALS: void GeometryChanged();
};
class GZ_GUI_VISIBLE DensityConfigWidget : public ConfigChildWidget
{
Q_OBJECT
public: DensityConfigWidget();
public: void SetDensity(const double _density);
public: double Density() const;
private slots: void OnComboBoxChanged(const QString &_text);
private slots: void OnSpinBoxChanged(const QString &_text);
Q_SIGNALS: void DensityValueChanged(const double &_value);
public: QComboBox *comboBox;
public: QDoubleSpinBox *spinBox;
private: double density;
};
class GZ_GUI_VISIBLE EnumConfigWidget : public ConfigChildWidget
{
Q_OBJECT
Q_SIGNALS: void EnumValueChanged(const QString &_value);
private slots: void EnumChanged(const QString &_value);
};
class GZ_GUI_VISIBLE GroupWidget : public QWidget
{
Q_OBJECT
public: QWidget *childWidget;
private slots: void Toggle(bool _checked);
};
class GZ_GUI_VISIBLE ConfigWidget : public QWidget
{
Q_OBJECT
public: ConfigWidget();
public: ~ConfigWidget();
public: void Load(const google::protobuf::Message *_msg);
public: google::protobuf::Message *Msg();
public: static std::string HumanReadableKey(const std::string &_key);
public: std::string UnitFromKey(const std::string &_key,
const std::string &_jointType = "") const;
public: void RangeFromKey(const std::string &_key,
double &_min, double &_max) const;
public: void SetWidgetVisible(const std::string &_name, bool _visible);
public: bool WidgetVisible(const std::string &_name) const;
public: void SetWidgetReadOnly(const std::string &_name, bool _readOnly);
public: bool WidgetReadOnly(const std::string &_name) const;
public: void UpdateFromMsg(const google::protobuf::Message *_msg);
public: bool SetIntWidgetValue(const std::string &_name, int _value);
public: bool SetUIntWidgetValue(const std::string &_name, unsigned int
_value);
public: bool SetDoubleWidgetValue(const std::string &_name,
double _value);
public: bool SetBoolWidgetValue(const std::string &_name, bool _value);
public: bool SetStringWidgetValue(const std::string &_name,
const std::string &_value);
public: bool SetVector3dWidgetValue(const std::string &_name,
const ignition::math::Vector3d &_value);
public: bool SetColorWidgetValue(const std::string &_name,
const common::Color &_value) GAZEBO_DEPRECATED(9);
public: bool SetColorWidgetValue(const std::string &_name,
const ignition::math::Color &_value);
public: bool SetPoseWidgetValue(const std::string &_name,
const ignition::math::Pose3d &_value);
public: bool SetGeometryWidgetValue(const std::string &_name,
const std::string &_value,
const ignition::math::Vector3d &_dimensions,
const std::string &_uri = "");
public: bool SetDensityWidgetValue(const std::string &_name,
const double _value);
public: bool SetEnumWidgetValue(const std::string &_name,
const std::string &_value);
public: bool AddItemEnumWidget(const std::string &_name,
const std::string &_itemText);
public: bool RemoveItemEnumWidget(const std::string &_name,
const std::string &_itemText);
public: bool ClearEnumWidget(const std::string &_name);
public: int IntWidgetValue(const std::string &_name) const;
public: unsigned int UIntWidgetValue(const std::string &_name) const;
public: double DoubleWidgetValue(const std::string &_name) const;
public: bool BoolWidgetValue(const std::string &_name) const;
public: std::string StringWidgetValue(const std::string &_name) const;
public: ignition::math::Vector3d Vector3dWidgetValue(
const std::string &_name) const;
public: ignition::math::Color ColorWidgetValue(
const std::string &_name) const;
public: ignition::math::Pose3d PoseWidgetValue(
const std::string &_name) const;
public: std::string GeometryWidgetValue(const std::string &_name,
ignition::math::Vector3d &_dimensions, std::string &_uri) const;
public: double DensityWidgetValue(const std::string &_name) const;
public: std::string EnumWidgetValue(const std::string &_name) const;
public: GroupWidget *CreateGroupWidget(const std::string &_name,
ConfigChildWidget *_childWidget, const int _level = 0);
public: ConfigChildWidget *CreateUIntWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateIntWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateDoubleWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateStringWidget(const std::string &_key,
const int _level = 0, const std::string &_type = "line");
public: ConfigChildWidget *CreateBoolWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateVector3dWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateColorWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreatePoseWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateGeometryWidget(const std::string &_key,
const int _level = 0);
public: ConfigChildWidget *CreateEnumWidget(const std::string &_key,
const std::vector<std::string> &_values, const int _level = 0);
public: ConfigChildWidget *CreateDensityWidget(const std::string &_key,
const int _level = 0);
public: bool AddConfigChildWidget(const std::string &_name,
ConfigChildWidget *_child);
public: void InsertLayout(QLayout *_layout, int _pos);
public: ConfigChildWidget *ConfigChildWidgetByName(
const std::string &_name) const;
public: unsigned int ConfigChildWidgetCount() const;
public: static QString StyleSheet(const std::string &_type,
const int _level = 0);
public: static const std::vector<QString> bgColors;
public: static const std::vector<QString> widgetColors;
public: static const QString redColor;
public: static const QString greenColor;
public: static const QString blueColor;
private: QWidget *Parse(google::protobuf::Message *_msg,
bool _update = false, const std::string &_name = "",
const int _level = 0);
private: ignition::math::Vector3d ParseVector3d(
const google::protobuf::Message *_msg) const;
private: void UpdateMsg(google::protobuf::Message *_msg,
const std::string &_name = "");
private: void UpdateVector3dMsg(google::protobuf::Message *_msg,
const ignition::math::Vector3d &_value);
private: bool UpdateUIntWidget(ConfigChildWidget *_widget,
const unsigned int _value);
private: bool UpdateIntWidget(ConfigChildWidget *_widget,
const int _value);
private: bool UpdateDoubleWidget(ConfigChildWidget *_widget,
const double _value);
private: bool UpdateStringWidget(ConfigChildWidget *_widget,
const std::string &_value);
private: bool UpdateBoolWidget(ConfigChildWidget *_widget,
const bool _value);
private: bool UpdateVector3dWidget(ConfigChildWidget *_widget,
const ignition::math::Vector3d &_value);
private: bool UpdateColorWidget(ConfigChildWidget *_widget,
const ignition::math::Color &_value);
private: bool UpdatePoseWidget(ConfigChildWidget *_widget,
const ignition::math::Pose3d &_value);
private: bool UpdateGeometryWidget(ConfigChildWidget *_widget,
const std::string &_value,
const ignition::math::Vector3d &_dimensions,
const std::string &_uri = "");
private: bool UpdateEnumWidget(ConfigChildWidget *_widget,
const std::string &_value);
private: bool UpdateDensityWidget(ConfigChildWidget *_widget,
const double _value);
private: int IntWidgetValue(ConfigChildWidget *_widget) const;
private: unsigned int UIntWidgetValue(ConfigChildWidget *_widget) const;
private: double DoubleWidgetValue(ConfigChildWidget *_widget) const;
private: bool BoolWidgetValue(ConfigChildWidget *_widget) const;
private: std::string StringWidgetValue(ConfigChildWidget *_widget) const;
private: ignition::math::Vector3d Vector3dWidgetValue(
ConfigChildWidget *_widget) const;
private: ignition::math::Color ColorWidgetValue(
ConfigChildWidget *_widget) const;
private: ignition::math::Pose3d PoseWidgetValue(
ConfigChildWidget *_widget) const;
private: std::string GeometryWidgetValue(ConfigChildWidget *_widget,
ignition::math::Vector3d &_dimensions, std::string &_uri) const;
private: std::string EnumWidgetValue(ConfigChildWidget *_widget) const;
private slots: void OnItemSelection(QTreeWidgetItem *_item,
const int _column);
private slots: void OnUIntValueChanged();
private slots: void OnIntValueChanged();
private slots: void OnDoubleValueChanged();
private slots: void OnBoolValueChanged();
private slots: void OnStringValueChanged();
private slots: void OnVector3dValueChanged();
private slots: void OnVector3dPresetChanged(const int _index);
private slots: void OnColorValueChanged();
private slots: void OnColorValueChanged(const QColor _value);
private slots: void OnPoseValueChanged();
private slots: void OnGeometryValueChanged();
private slots: void OnGeometryValueChanged(const int _value);
private slots: void OnEnumValueChanged(const QString &_value);
private slots: void OnCustomColorDialog();
Q_SIGNALS: void UIntValueChanged(const QString &_name,
const unsigned int _value);
Q_SIGNALS: void IntValueChanged(const QString &_name, const int _value);
Q_SIGNALS: void DoubleValueChanged(const QString &_name,
const double _value);
Q_SIGNALS: void BoolValueChanged(const QString &_name,
const bool _value);
Q_SIGNALS: void StringValueChanged(const QString &_name,
const std::string &_value);
Q_SIGNALS: void Vector3dValueChanged(const QString &_name,
const ignition::math::Vector3d &_value);
Q_SIGNALS: void ColorValueChanged(const QString &_name,
const ignition::math::Color &_value);
Q_SIGNALS: void PoseValueChanged(const QString &_name,
const ignition::math::Pose3d &_pose);
Q_SIGNALS: void GeometryValueChanged(const std::string &_name,
const std::string &_value,
const ignition::math::Vector3d &_dimensions,
const std::string &_uri);
Q_SIGNALS: void EnumValueChanged(const QString &_name,
const QString &_value);
Q_SIGNALS: void DensityValueChanged(const double &_value);
Q_SIGNALS: void MassValueChanged(const double &_value);
private slots: void OnDensityValueChanged(const double _value);
private slots: void OnMassValueChanged(const double _value);
private slots: void OnGeometryChanged();
Q_SIGNALS: void GeometryChanged();
private: bool eventFilter(QObject *_obj, QEvent *_event);
private: std::unique_ptr<ConfigWidgetPrivate> dataPtr;
};
}
}
#endif
gazebo::gui::ConfigWidget::RemoveItemEnumWidget
bool RemoveItemEnumWidget(const std::string &_name, const std::string &_itemText)
Remove an item from a child enum widget.
gazebo::gui::ConfigWidget::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.
gazebo::gui::ConfigWidget::MassValueChanged
void MassValueChanged(const double &_value)
Signal emitted when mass value changes.
gazebo::gui::ConfigWidget::Vector3dValueChanged
void Vector3dValueChanged(const QString &_name, const ignition::math::Vector3d &_value)
Signal that a vector3 config widget's value has changed.
gazebo::gui::GeometryConfigWidget
A widget for configuring geometry properties.
Definition: ConfigWidget.hh:82
gazebo::gui::ConfigWidget::CreateDoubleWidget
ConfigChildWidget * CreateDoubleWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a double value.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
qt.h
gazebo::gui::ConfigWidget::SetBoolWidgetValue
bool SetBoolWidgetValue(const std::string &_name, bool _value)
Set a bool value to a child widget.
gazebo::gui::ConfigChildWidget::key
std::string key
Widget's key value.
Definition: ConfigWidget.hh:64
gazebo::gui::ConfigWidget::PoseValueChanged
void PoseValueChanged(const QString &_name, const ignition::math::Pose3d &_pose)
Signal that a pose config widget's value has changed.
NULL
#define NULL
Definition: CommonTypes.hh:31
gazebo::gui::ConfigWidget::HumanReadableKey
static std::string HumanReadableKey(const std::string &_key)
Create a human readable key, capitalizing the first letter and removing characters like "_".
gazebo::gui::ConfigWidget::SetWidgetReadOnly
void SetWidgetReadOnly(const std::string &_name, bool _readOnly)
Set whether a child widget should be read-only.
gazebo::gui::ConfigWidget::StyleSheet
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.
gazebo::gui::ConfigChildWidget::widgets
std::vector< QWidget * > widgets
List of widgets holding values, such as Spins and LineEdits.
Definition: ConfigWidget.hh:70
gazebo::gui::DensityConfigWidget
A widget for configuring density properties.
Definition: ConfigWidget.hh:125
gazebo::gui::ConfigWidget::Vector3dWidgetValue
ignition::math::Vector3d Vector3dWidgetValue(const std::string &_name) const
Get a vector3 value from a child widget.
gazebo::gui::ConfigWidget::SetDensityWidgetValue
bool SetDensityWidgetValue(const std::string &_name, const double _value)
Set a density value to a child widget.
gazebo::gui::ConfigWidget::SetDoubleWidgetValue
bool SetDoubleWidgetValue(const std::string &_name, double _value)
Set a double value to a child widget.
gazebo::gui::ConfigWidget::WidgetReadOnly
bool WidgetReadOnly(const std::string &_name) const
Get whether a child widget is read-only.
gazebo::gui::ConfigWidget::GeometryValueChanged
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.
gazebo::gui::DensityConfigWidget::comboBox
QComboBox * comboBox
A combo box for selecting a material density.
Definition: ConfigWidget.hh:153
gazebo::gui::ConfigWidget::ConfigWidget
ConfigWidget()
Constructor.
gazebo::gui::ConfigWidget::SetWidgetVisible
void SetWidgetVisible(const std::string &_name, bool _visible)
Set whether a child widget should be visible.
gazebo::gui::ConfigWidget::WidgetVisible
bool WidgetVisible(const std::string &_name) const
Get whether a child widget is visible.
gazebo::gui::ConfigWidget::ConfigChildWidgetByName
ConfigChildWidget * ConfigChildWidgetByName(const std::string &_name) const
Get a config child widget by its name.
gazebo::gui::ConfigWidget::InsertLayout
void InsertLayout(QLayout *_layout, int _pos)
Insert a layout into the config widget's layout at a specific position.
gazebo::gui::ConfigWidget::RangeFromKey
void RangeFromKey(const std::string &_key, double &_min, double &_max) const
Returns the range for a given key.
gazebo::gui::DensityConfigWidget::Density
double Density() const
Accessor for the widget's density value.
gazebo::gui::ConfigWidget::SetVector3dWidgetValue
bool SetVector3dWidgetValue(const std::string &_name, const ignition::math::Vector3d &_value)
Set a vector3 value to a child widget.
gazebo::gui::ConfigWidget::DoubleWidgetValue
double DoubleWidgetValue(const std::string &_name) const
Get a double value from a child widget.
gazebo::gui::EnumConfigWidget
A widget for configuring enum values.
Definition: ConfigWidget.hh:164
gazebo::gui::ConfigWidget::IntWidgetValue
int IntWidgetValue(const std::string &_name) const
Get an integer value from a child widget.
gazebo::gui::ConfigWidget::CreateDensityWidget
ConfigChildWidget * CreateDensityWidget(const std::string &_key, const int _level=0)
Create a widget for setting a density value.
gazebo::gui::ConfigWidget::CreateUIntWidget
ConfigChildWidget * CreateUIntWidget(const std::string &_key, const int _level=0)
Create a widget for configuring an unsigned integer value.
gazebo::gui::GeometryConfigWidget::geomLengthUnitLabel
QWidget * geomLengthUnitLabel
A label for the unit of the length widget.
Definition: ConfigWidget.hh:97
gazebo::gui::ConfigWidget::SetStringWidgetValue
bool SetStringWidgetValue(const std::string &_name, const std::string &_value)
Set a string value to a child widget.
gazebo::gui::ConfigWidget::SetUIntWidgetValue
bool SetUIntWidgetValue(const std::string &_name, unsigned int _value)
Set an unsigned integer value to a child widget.
gazebo::gui::ConfigWidget::BoolValueChanged
void BoolValueChanged(const QString &_name, const bool _value)
Signal that a bool config widget's value has changed.
gazebo::gui::GroupWidget::childWidget
QWidget * childWidget
Child widget that can be collapsed or expanded.
Definition: ConfigWidget.hh:184
gazebo::gui::ConfigWidget::SetEnumWidgetValue
bool SetEnumWidgetValue(const std::string &_name, const std::string &_value)
Set an enum value to a child widget.
gazebo::gui::ConfigWidget::greenColor
static const QString greenColor
Green color used for "green" or "y" fields.
Definition: ConfigWidget.hh:559
gazebo::gui::ConfigWidget::EnumValueChanged
void EnumValueChanged(const QString &_name, const QString &_value)
Signal that an enum config widget's enum value has changed.
gazebo::gui::ConfigChildWidget
A convenience widget that also holds pointers to a list of its child widgets.
Definition: ConfigWidget.hh:56
Color.hh
gazebo::gui::ConfigWidget::IntValueChanged
void IntValueChanged(const QString &_name, const int _value)
Signal that an int config widget's value has changed.
gazebo::gui::GeometryConfigWidget::geomFilenameLineEdit
QWidget * geomFilenameLineEdit
A line edit for editing the mesh filename.
Definition: ConfigWidget.hh:100
gazebo::gui::DensityConfigWidget::DensityValueChanged
void DensityValueChanged(const double &_value)
Signal emitted when density has changed.
gazebo::gui::ConfigWidget::bgColors
static const std::vector< QString > bgColors
List of colors used for the background of widgets according to their level.
Definition: ConfigWidget.hh:550
gazebo::gui::GeometryConfigWidget::geomFilenameButton
QWidget * geomFilenameButton
A button for selecting the mesh filename.
Definition: ConfigWidget.hh:106
gazebo::gui::GeometryConfigWidget::geomDimensionWidget
QStackedWidget * geomDimensionWidget
A stacked widget containing widgets for configuring geometry dimensions.
Definition: ConfigWidget.hh:88
gazebo::gui::GeometryConfigWidget::GeometryChanged
void GeometryChanged()
Signal emitted when geometry changes.
gazebo::gui::ConfigWidget::CreatePoseWidget
ConfigChildWidget * CreatePoseWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a pose value.
gazebo::gui::ConfigWidget::PoseWidgetValue
ignition::math::Pose3d PoseWidgetValue(const std::string &_name) const
Get a pose value from a child widget.
gazebo::gui::ConfigWidget::EnumWidgetValue
std::string EnumWidgetValue(const std::string &_name) const
Get an enum value from a child widget.
gazebo::gui::ConfigWidget::AddItemEnumWidget
bool AddItemEnumWidget(const std::string &_name, const std::string &_itemText)
Add an item to a child enum widget.
gazebo::gui::ConfigWidget::AddConfigChildWidget
bool AddConfigChildWidget(const std::string &_name, ConfigChildWidget *_child)
Register a child widget as a child of this widget, so it can be updated.
gazebo::gui::ConfigWidget::ClearEnumWidget
bool ClearEnumWidget(const std::string &_name)
Remove all items from a child enum widget.
gazebo::gui::ConfigWidget::UpdateFromMsg
void UpdateFromMsg(const google::protobuf::Message *_msg)
Update the widgets from a message.
gazebo::gui::GroupWidget
A collapsible widget that holds child widgets.
Definition: ConfigWidget.hh:179
gazebo::gui::ConfigWidget::DensityWidgetValue
double DensityWidgetValue(const std::string &_name) const
Get a density value from a child widget.
gazebo::gui::ConfigChildWidget::scopedName
std::string scopedName
Widget's scoped name within parent config widget.
Definition: ConfigWidget.hh:67
gazebo::gui::ConfigWidget::redColor
static const QString redColor
Red color used for "red" or "x" fields.
Definition: ConfigWidget.hh:556
gazebo::gui::ConfigWidget::SetPoseWidgetValue
bool SetPoseWidgetValue(const std::string &_name, const ignition::math::Pose3d &_value)
Set a pose value to a child widget.
gazebo::gui::ConfigWidget::ColorValueChanged
void ColorValueChanged(const QString &_name, const ignition::math::Color &_value)
Signal that a color config widget's value has changed.
gazebo::gui::ConfigWidget::CreateColorWidget
ConfigChildWidget * CreateColorWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a color value.
gui
gui
Definition: KeyEventHandler.hh:29
gazebo::gui::GeometryConfigWidget::geomFilenameLabel
QWidget * geomFilenameLabel
A label for the mesh filename widget.
Definition: ConfigWidget.hh:103
gazebo::gui::ConfigChildWidget::ConfigChildWidget
ConfigChildWidget()
Constructor;.
Definition: ConfigWidget.hh:61
gazebo::gui::DensityConfigWidget::spinBox
QDoubleSpinBox * spinBox
A spin box for entering a density value.
Definition: ConfigWidget.hh:156
gazebo::common::Color
Defines a color.
Definition: Color.hh:36
gazebo::gui::ConfigWidget::CreateIntWidget
ConfigChildWidget * CreateIntWidget(const std::string &_key, const int _level=0)
Create a widget for configuring an integer value.
gazebo::gui::GeometryConfigWidget::geomLengthSpinBox
QWidget * geomLengthSpinBox
A spin box for configuring the length of the geometry.
Definition: ConfigWidget.hh:91
gazebo::gui::ConfigChildWidget::groupWidget
GroupWidget * groupWidget
Pointer to group widget.
Definition: ConfigWidget.hh:77
gazebo::gui::ConfigWidget::SetColorWidgetValue
bool SetColorWidgetValue(const std::string &_name, const common::Color &_value) GAZEBO_DEPRECATED(9)
Set a color value to a child widget.
gazebo::gui::ConfigWidget::BoolWidgetValue
bool BoolWidgetValue(const std::string &_name) const
Get a bool value from a child widget.
gazebo::gui::ConfigWidget::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.
GAZEBO_DEPRECATED
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
gazebo::gui::ConfigWidget::ConfigChildWidgetCount
unsigned int ConfigChildWidgetCount() const
Get the number of child widgets.
gazebo::gui::ConfigWidget::DoubleValueChanged
void DoubleValueChanged(const QString &_name, const double _value)
Signal that a double config widget's value has changed.
gazebo::gui::ConfigWidget::~ConfigWidget
~ConfigWidget()
Destructor.
gazebo::gui::ConfigWidget::Load
void Load(const google::protobuf::Message *_msg)
Load from a google protobuf message.
gazebo::gui::ConfigWidget::ColorWidgetValue
ignition::math::Color ColorWidgetValue(const std::string &_name) const
Get a color value from a child widget.
gazebo::gui::ConfigWidget::SetGeometryWidgetValue
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.
gazebo::gui::ConfigWidget::UIntWidgetValue
unsigned int UIntWidgetValue(const std::string &_name) const
Get an unsigned integer value from a child widget.
gazebo::gui::ConfigWidget
A widget generated from a google protobuf message.
Definition: ConfigWidget.hh:193
gazebo::gui::DensityConfigWidget::DensityConfigWidget
DensityConfigWidget()
Constructor.
gazebo::gui::ConfigWidget::Msg
google::protobuf::Message * Msg()
Get the updated message.
gazebo::gui::ConfigWidget::StringWidgetValue
std::string StringWidgetValue(const std::string &_name) const
Get a string value from a child widget.
gazebo::gui::ConfigWidget::CreateBoolWidget
ConfigChildWidget * CreateBoolWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a bool value.
gazebo::gui::ConfigWidget::SetIntWidgetValue
bool SetIntWidgetValue(const std::string &_name, int _value)
Set an integer value to a child widget.
gazebo::gui::EnumConfigWidget::EnumValueChanged
void EnumValueChanged(const QString &_value)
brief Signal an enum value change event.
gazebo::gui::ConfigWidget::StringValueChanged
void StringValueChanged(const QString &_name, const std::string &_value)
Signal that a string config widget's value has changed.
gazebo::gui::DensityConfigWidget::SetDensity
void SetDensity(const double _density)
Updates the widget's density value.
gazebo::gui::ConfigWidget::CreateGeometryWidget
ConfigChildWidget * CreateGeometryWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a geometry value.
gazebo::gui::ConfigChildWidget::mapWidgetToUnit
std::map< QWidget *, QLabel * > mapWidgetToUnit
Map a widget to the label holding its unit value.
Definition: ConfigWidget.hh:73
gazebo::gui::GeometryConfigWidget::geomLengthLabel
QWidget * geomLengthLabel
A label for the length widget.
Definition: ConfigWidget.hh:94
gazebo::gui::ConfigWidget::CreateVector3dWidget
ConfigChildWidget * CreateVector3dWidget(const std::string &_key, const int _level=0)
Create a widget for configuring a vector3 value.
gazebo::gui::ConfigWidget::UnitFromKey
std::string UnitFromKey(const std::string &_key, const std::string &_jointType="") const
Returns the unit for a given key.
gazebo::gui::ConfigWidget::GeometryWidgetValue
std::string GeometryWidgetValue(const std::string &_name, ignition::math::Vector3d &_dimensions, std::string &_uri) const
Get a geometry value from a child widget.
gazebo::gui::ConfigWidget::blueColor
static const QString blueColor
Blue color used for "blue" or "z" fields.
Definition: ConfigWidget.hh:562
google
Definition: ConfigWidget.hh:33
gazebo::gui::ConfigWidget::CreateStringWidget
ConfigChildWidget * CreateStringWidget(const std::string &_key, const int _level=0, const std::string &_type="line")
Create a widget for configuring a string value.
gazebo::gui::ConfigWidget::UIntValueChanged
void UIntValueChanged(const QString &_name, const unsigned int _value)
Signal that a uint config widget's value has changed.
gazebo::gui::ConfigWidget::widgetColors
static const std::vector< QString > widgetColors
List of colors used for widget areas according to their level.
Definition: ConfigWidget.hh:553