18 #ifndef GAZEBO_GUI_MODEL_VISUALCONFIG_HH_ 19 #define GAZEBO_GUI_MODEL_VISUALCONFIG_HH_ 24 #include <ignition/math/Pose3.hh> 25 #include <ignition/math/Vector3.hh> 50 private slots:
void OnToggleItem(
bool _checked);
91 public:
void AddVisual(
const std::string &_name,
92 const msgs::Visual *_visualMsg =
NULL);
97 public:
void UpdateVisual(
const std::string &_name,
98 ConstVisualPtr _visualMsg);
101 public:
void Reset();
105 public:
unsigned int GetVisualCount()
const;
110 public:
void SetShowVisual(
const bool _show,
const std::string &_name);
115 public: msgs::Visual *GetData(
const std::string &_name)
const;
121 public:
void SetGeometry(
const std::string &_name,
122 const ignition::math::Vector3d &_size,
const std::string &_uri =
"");
128 public:
void Geometry(
const std::string &_name,
129 ignition::math::Vector3d &_size, std::string &_uri);
138 public:
void SetMaterial(
const std::string &_name,
139 const std::string &_materialName,
140 const ignition::math::Color &_ambient,
141 const ignition::math::Color &_diffuse,
142 const ignition::math::Color &_specular,
143 const ignition::math::Color &_emissive);
147 public:
const std::map<int, VisualConfigData *> &ConfigData()
const;
151 Q_SIGNALS:
void VisualRemoved(
const std::string &_name);
155 Q_SIGNALS:
void VisualAdded(
const std::string &_name);
160 Q_SIGNALS:
void ShowVisual(
const bool _show,
const std::string &_name);
163 Q_SIGNALS:
void Applied();
166 private slots:
void OnAddVisual();
170 private slots:
void OnRemoveVisual(
int _id);
174 private slots:
void OnShowVisual(
const int _id);
180 private slots:
void OnPoseChanged(
const QString &_name,
181 const ignition::math::Pose3d &_value);
189 private slots:
void OnGeometryChanged(
const std::string &_name,
190 const std::string &_value,
191 const ignition::math::Vector3d &_dimensions,
192 const std::string &_uri);
198 private slots:
void OnColorChanged(
const QString &_name,
199 const ignition::math::Color &_value);
205 private slots:
void OnDoubleChanged(
const QString &_name,
206 const double _value);
212 private slots:
void OnStringChanged(
const QString &_name,
213 const std::string &_value);
216 private: std::map<int, VisualConfigData *> configs;
219 private: std::map<int, VisualConfigData *> deletedConfigs;
222 private: std::map<int, VisualConfigData *> addedConfigs;
225 private:
int counter;
228 private: QSignalMapper *mapperRemove;
231 private: QSignalMapper *mapperShow;
234 private: QVBoxLayout *listLayout;
std::string name
Name of the visual.
Definition: VisualConfig.hh:56
int id
Unique ID of this visual config.
Definition: VisualConfig.hh:53
Forward declarations for the common classes.
Definition: Animation.hh:26
A class of widgets used for configuring visual properties.
Definition: VisualConfig.hh:41
ConfigWidget * configWidget
Config widget for configuring visual properties.
Definition: VisualConfig.hh:59
void RestoreOriginalData()
Restore the widget's data to how it was when first opened.
A tab for configuring visual properties of a link.
Definition: VisualConfig.hh:71
msgs::Visual originalDataMsg
Message containing the data which was in the widget when first open.
Definition: VisualConfig.hh:66
QWidget * widget
Widget associated with this data.
Definition: VisualConfig.hh:62
gui
Definition: KeyEventHandler.hh:29
#define NULL
Definition: CommonTypes.hh:31
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.