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,
174 private:
void ProcessModelMsgs();
175 private:
void ProcessLightMsgs();
176 private:
void ProcessRemoveEntity();
178 public:
void InitTransport(
const std::string &_name =
"");
179 private:
void ResetTree();
180 private:
void ResetScene();
184 private:
void ModelPropertyChanged(
QtProperty *_item);
188 private:
void ScenePropertyChanged(
QtProperty *_item);
190 private:
void LightPropertyChanged(
QtProperty *_item);
194 private:
void PhysicsPropertyChanged(
QtProperty *_item);
196 private: QTreeWidget *modelTreeWidget;
209 private: QTreeWidgetItem *sceneItem;
210 private: QTreeWidgetItem *physicsItem;
211 private: QTreeWidgetItem *modelsItem;
212 private: QTreeWidgetItem *lightsItem;
213 private: QTreeWidgetItem *sphericalCoordItem;
217 private: boost::mutex *propMutex, *receiveMutex;
218 private: sdf::ElementPtr sdfElement;
219 private: std::string selectedEntityName;
220 private:
bool fillingPropertyTree;
223 private: msgs::Request *requestMsg;
225 private: std::vector<event::ConnectionPtr> connections;
227 typedef std::list<msgs::Model> ModelMsgs_L;
228 private: ModelMsgs_L modelMsgs;
230 typedef std::list<msgs::Light> LightMsgs_L;
231 private: LightMsgs_L lightMsgs;
233 typedef std::list<std::string> RemoveEntity_L;
234 private: RemoveEntity_L removeEntityList;
236 private: msgs::Model modelMsg;
237 private: msgs::Link linkMsg;
238 private: msgs::Scene sceneMsg;
239 private: msgs::Joint jointMsg;
240 private: msgs::Physics physicsMsg;
241 private: msgs::Light lightMsg;
242 private: msgs::SphericalCoordinates sphericalCoordMsg;
244 private:
bool fillPropertyTree;
245 private: std::deque<std::string> fillTypes;
247 private: msgs::Light::LightType lightType;
250 private: msgs::Physics_Type physicsType;
258 public:
virtual void paint(QPainter *painter,
259 const QStyleOptionViewItem &option,
260 const QModelIndex &index)
const;
262 public:
virtual QSize sizeHint(
const QStyleOptionViewItem &opt,
263 const QModelIndex &index)
const;
265 private: QTreeView *m_view;
Definition: ModelListWidget.hh:253
Definition: qtpropertybrowser.h:311
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:48
Definition: qtvariantproperty.h:92
Forward declarations for transport.
Definition: qttreepropertybrowser.h:142
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:52
Definition: qtpropertybrowser.h:77
Definition: qtvariantproperty.h:302
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:44
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48