17 #ifndef GAZEBO_GUI_MODELLISTWIDGET_HH_ 18 #define GAZEBO_GUI_MODELLISTWIDGET_HH_ 23 #include <ignition/msgs/plugin.pb.h> 24 #include <ignition/msgs/plugin_v.pb.h> 33 class QTreeWidgetItem;
39 class ModelListWidgetPrivate;
47 private slots:
void OnModelSelection(QTreeWidgetItem *item,
int column);
48 private slots:
void Update();
49 private slots:
void OnPropertyChanged(QtProperty *_item);
50 private slots:
void OnCustomContextMenu(
const QPoint &_pt);
51 private slots:
void OnCurrentPropertyChanged(QtBrowserItem *_item);
52 private:
void OnSetSelectedEntity(
const std::string &_name,
53 const std::string &_mode);
54 private:
void OnResponse(ConstResponsePtr &_msg);
56 private:
void OnModelUpdate(
const msgs::Model &_msg);
60 private:
void OnLightUpdate(
const msgs::Light &_msg);
62 private:
void OnRequest(ConstRequestPtr &_msg);
64 private:
void OnRemoveScene(
const std::string &_name);
65 private:
void OnCreateScene(
const std::string &_name);
67 private:
void AddModelToList(
const msgs::Model &_msg);
69 private:
void FillMsgField(QtProperty *_item,
70 google::protobuf::Message *_message,
71 const google::protobuf::Reflection *_reflection,
72 const google::protobuf::FieldDescriptor *_field);
74 private:
void FillMsg(QtProperty *_item,
75 google::protobuf::Message *_message,
76 const google::protobuf::Descriptor *_descriptor,
77 QtProperty *_changedItem);
79 private:
void FillGeometryMsg(QtProperty *_item,
80 google::protobuf::Message *_message,
81 const google::protobuf::Descriptor *_descriptor,
82 QtProperty *_changedItem);
84 private:
void FillPoseMsg(QtProperty *_item,
85 google::protobuf::Message *_message,
86 const google::protobuf::Descriptor *_descriptor);
88 private:
void FillColorMsg(QtProperty *_item, msgs::Color *_msg);
90 private:
void FillVector3Msg(QtProperty *_item, msgs::Vector3d *_msg);
92 private: QtProperty *PopChildItem(QList<QtProperty*> &_list,
93 const std::string &_name);
95 private: QtProperty *ParentItemValue(
const std::string &_name);
96 private: QtProperty *ParentItemValue(QtProperty *_item,
97 const std::string &_name);
99 private: QtProperty *ParentItem(
const std::string &_name);
100 private: QtProperty *ParentItem(QtProperty *_item,
101 const std::string &_name);
103 private: QtProperty *ChildItemValue(
const std::string &_name);
104 private: QtProperty *ChildItemValue(QtProperty *_item,
105 const std::string &_name);
107 private: QtProperty *ChildItem(
const std::string &_name);
108 private: QtProperty *ChildItem(QtProperty *_item,
109 const std::string &_name);
111 private:
bool HasChildItem(QtProperty *_parent, QtProperty *_child);
113 private:
void RemoveEntity(
const std::string &_name);
115 private: QTreeWidgetItem *ListItem(
const std::string &_name,
116 QTreeWidgetItem *_parent);
118 private:
void FillPropertyTree(
const msgs::Model &_msg,
119 QtProperty *_parent);
125 private:
void FillPropertyTree(
const ignition::msgs::Plugin &_msg,
126 QtProperty *_parent);
128 private:
void FillPropertyTree(
const msgs::Link &_msg,
129 QtProperty *_parent);
131 private:
void FillPropertyTree(
const msgs::Collision &_msg,
132 QtProperty *_parent);
134 private:
void FillPropertyTree(
const msgs::Joint &_msg,
135 QtProperty *_parent);
137 private:
void FillPropertyTree(
const msgs::Surface &_msg,
138 QtProperty *_parent);
140 private:
void FillPropertyTree(
const msgs::Visual &_msg,
141 QtProperty *_parent);
143 private:
void FillPropertyTree(
const msgs::Geometry &_msg,
144 QtProperty *_parent);
146 private:
void FillPropertyTree(
const msgs::Scene &_msg,
147 QtProperty *_parent);
149 private:
void FillPropertyTree(
const msgs::Physics &_msg,
150 QtProperty *_parent);
152 private:
void FillPropertyTree(
const msgs::Wind &_msg,
153 QtProperty *_parent);
159 private:
void FillPropertyTree(
const msgs::Atmosphere &_msg,
160 QtProperty *_parent);
162 private:
void FillPropertyTree(
const msgs::Light &_msg,
163 QtProperty *_parent);
165 private:
void FillVector3dProperty(
const msgs::Vector3d &_msg,
166 QtProperty *_parent);
168 private:
void FillPoseProperty(
const msgs::Pose &_msg,
169 QtProperty *_parent);
175 private:
void FillPropertyTree(
const msgs::SphericalCoordinates &_msg,
176 QtProperty *_parent);
180 private:
void FillUserCamera();
183 private:
void FillGrid();
188 private:
void AddProperty(QtProperty *_item, QtProperty *_parent);
190 private:
void ProcessModelMsgs();
191 private:
void ProcessLightMsgs();
192 private:
void ProcessRemoveEntity();
194 public:
void InitTransport(
const std::string &_name =
"");
195 private:
void ResetTree();
196 private:
void ResetScene();
200 private:
void ModelPropertyChanged(QtProperty *_item);
204 private:
void ScenePropertyChanged(QtProperty *_item);
206 private:
void LightPropertyChanged(QtProperty *_item);
210 private:
void PhysicsPropertyChanged(QtProperty *_item);
214 private:
void WindPropertyChanged(QtProperty *_item);
218 private:
void AtmospherePropertyChanged(QtProperty *_item);
222 private:
void GUIPropertyChanged(QtProperty *_item);
226 private:
void GUICameraPropertyChanged(QtProperty *_item);
230 private:
void GUIGridPropertyChanged(QtProperty *_item);
235 private:
void OnPluginInfo(
const ignition::msgs::Plugin_V &_plugins,
236 const bool _success);
240 private: std::unique_ptr<ModelListWidgetPrivate> dataPtr;
Forward declarations for the common classes.
Definition: Animation.hh:26