17 #ifndef _MODEL_LIST_WIDGET_HH_
18 #define _MODEL_LIST_WIDGET_HH_
33 class QTreeWidgetItem;
38 class QtTreePropertyItem;
44 class recursive_mutex;
52 class ModelEditWidget;
60 private slots:
void OnModelSelection(QTreeWidgetItem *item,
int column);
61 private slots:
void Update();
62 private slots:
void OnPropertyChanged(
QtProperty *_item);
63 private slots:
void OnCustomContextMenu(
const QPoint &_pt);
64 private slots:
void OnCurrentPropertyChanged(
QtBrowserItem *_item);
65 private:
void OnSetSelectedEntity(
const std::string &_name,
66 const std::string &_mode);
67 private:
void OnResponse(ConstResponsePtr &_msg);
69 private:
void OnModelUpdate(
const msgs::Model &_msg);
73 private:
void OnLightUpdate(
const msgs::Light &_msg);
75 private:
void OnRequest(ConstRequestPtr &_msg);
77 private:
void OnRemoveScene(
const std::string &_name);
78 private:
void OnCreateScene(
const std::string &_name);
80 private:
void AddModelToList(
const msgs::Model &_msg);
83 google::protobuf::Message *_message,
84 const google::protobuf::Reflection *_reflection,
85 const google::protobuf::FieldDescriptor *_field);
88 google::protobuf::Message *_message,
89 const google::protobuf::Descriptor *_descriptor,
92 private:
void FillGeometryMsg(
QtProperty *_item,
93 google::protobuf::Message *_message,
94 const google::protobuf::Descriptor *_descriptor,
98 google::protobuf::Message *_message,
99 const google::protobuf::Descriptor *_descriptor);
101 private:
void FillColorMsg(
QtProperty *_item, msgs::Color *_msg);
103 private:
void FillVector3Msg(
QtProperty *_item, msgs::Vector3d *_msg);
105 private:
QtProperty *PopChildItem(QList<QtProperty*> &_list,
106 const std::string &_name);
108 private:
QtProperty *GetParentItemValue(
const std::string &_name);
110 const std::string &_name);
112 private:
QtProperty *GetParentItem(
const std::string &_name);
114 const std::string &_name);
116 private:
QtProperty *GetChildItemValue(
const std::string &_name);
118 const std::string &_name);
120 private:
QtProperty *GetChildItem(
const std::string &_name);
122 const std::string &_name);
126 private:
void RemoveEntity(
const std::string &_name);
128 private: QTreeWidgetItem *GetListItem(
const std::string &_name,
129 QTreeWidgetItem *_parent);
131 private:
void FillPropertyTree(
const msgs::Model &_msg,
134 private:
void FillPropertyTree(
const msgs::Link &_msg,
137 private:
void FillPropertyTree(
const msgs::Collision &_msg,
140 private:
void FillPropertyTree(
const msgs::Joint &_msg,
143 private:
void FillPropertyTree(
const msgs::Surface &_msg,
146 private:
void FillPropertyTree(
const msgs::Visual &_msg,
149 private:
void FillPropertyTree(
const msgs::Geometry &_msg,
152 private:
void FillPropertyTree(
const msgs::Scene &_msg,
155 private:
void FillPropertyTree(
const msgs::Physics &_msg,
158 private:
void FillPropertyTree(
const msgs::Light &_msg,
161 private:
void FillVector3dProperty(
const msgs::Vector3d &_msg,
164 private:
void FillPoseProperty(
const msgs::Pose &_msg,
171 private:
void FillPropertyTree(
const msgs::SphericalCoordinates &_msg,
179 private:
void ProcessModelMsgs();
180 private:
void ProcessLightMsgs();
181 private:
void ProcessRemoveEntity();
183 public:
void InitTransport(
const std::string &_name =
"");
184 private:
void ResetTree();
185 private:
void ResetScene();
189 private:
void ModelPropertyChanged(
QtProperty *_item);
193 private:
void ScenePropertyChanged(
QtProperty *_item);
195 private:
void LightPropertyChanged(
QtProperty *_item);
199 private:
void PhysicsPropertyChanged(
QtProperty *_item);
203 private:
void GUIPropertyChanged(
QtProperty *_item);
205 private: QTreeWidget *modelTreeWidget;
219 private: QTreeWidgetItem *guiItem;
222 private: QTreeWidgetItem *sceneItem;
225 private: QTreeWidgetItem *physicsItem;
228 private: QTreeWidgetItem *modelsItem;
231 private: QTreeWidgetItem *lightsItem;
234 private: QTreeWidgetItem *sphericalCoordItem;
238 private: boost::mutex *propMutex, *receiveMutex;
239 private: sdf::ElementPtr sdfElement;
240 private: std::string selectedEntityName;
241 private:
bool fillingPropertyTree;
244 private: msgs::Request *requestMsg;
246 private: std::vector<event::ConnectionPtr> connections;
249 private: ModelMsgs_L modelMsgs;
252 private: LightMsgs_L lightMsgs;
254 typedef std::list<std::string> RemoveEntity_L;
255 private: RemoveEntity_L removeEntityList;
257 private: msgs::Model modelMsg;
258 private: msgs::Link linkMsg;
259 private: msgs::Scene sceneMsg;
260 private: msgs::Joint jointMsg;
261 private: msgs::Physics physicsMsg;
262 private: msgs::Light lightMsg;
263 private: msgs::SphericalCoordinates sphericalCoordMsg;
265 private:
bool fillPropertyTree;
266 private: std::deque<std::string> fillTypes;
268 private: msgs::Light::LightType lightType;
271 private: msgs::Physics_Type physicsType;
279 public:
virtual void paint(QPainter *painter,
280 const QStyleOptionViewItem &option,
281 const QModelIndex &index)
const;
283 public:
virtual QSize sizeHint(
const QStyleOptionViewItem &opt,
284 const QModelIndex &index)
const;
286 private: QTreeView *m_view;
Definition: ModelListWidget.hh:274
Definition: qtpropertybrowser.h:311
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Definition: qtvariantproperty.h:92
Forward declarations for transport.
Definition: qttreepropertybrowser.h:142
std::list< boost::shared_ptr< msgs::Model const > > ModelMsgs_L
Definition: ScenePrivate.hh:92
std::list< boost::shared_ptr< msgs::Light const > > LightMsgs_L
Definition: ScenePrivate.hh:72
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
Definition: qtpropertybrowser.h:77
Definition: qtvariantproperty.h:302
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66