Gazebo Gui

API Reference

9.0.0~pre1
PointCloud.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 Open Source Robotics Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef GZ_GUI_PLUGINS_POINTCLOUD_HH_
19#define GZ_GUI_PLUGINS_POINTCLOUD_HH_
20
21#include <memory>
22
23#include <gz/msgs/float_v.pb.h>
24#include <gz/msgs/pointcloud_packed.pb.h>
25
26#include "gz/gui/Plugin.hh"
27
28#include <gz/utils/ImplPtr.hh>
29
30namespace gz::gui::plugins
31{
52 {
53 Q_OBJECT
54
56 Q_PROPERTY(
57 QStringList pointCloudTopicList
58 READ PointCloudTopicList
59 WRITE SetPointCloudTopicList
60 NOTIFY PointCloudTopicListChanged
61 )
62
63
64 Q_PROPERTY(
65 QStringList floatVTopicList
66 READ FloatVTopicList
67 WRITE SetFloatVTopicList
68 NOTIFY FloatVTopicListChanged
69 )
70
72 Q_PROPERTY(
73 QColor minColor
74 READ MinColor
75 WRITE SetMinColor
76 NOTIFY MinColorChanged
77 )
78
80 Q_PROPERTY(
81 QColor maxColor
82 READ MaxColor
83 WRITE SetMaxColor
84 NOTIFY MaxColorChanged
85 )
86
88 Q_PROPERTY(
89 float minFloatV
90 READ MinFloatV
91 WRITE SetMinFloatV
92 NOTIFY MinFloatVChanged
93 )
94
96 Q_PROPERTY(
97 float maxFloatV
98 READ MaxFloatV
99 WRITE SetMaxFloatV
100 NOTIFY MaxFloatVChanged
101 )
102
104 Q_PROPERTY(
105 float pointSize
106 READ PointSize
107 WRITE SetPointSize
108 NOTIFY PointSizeChanged
109 )
110
112 public: PointCloud();
113
115 public: ~PointCloud() override;
116
117 // Documentation inherited
118 public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override;
119
122 public: void OnPointCloud(const msgs::PointCloudPacked &_msg);
123
127 public: void OnPointCloudService(const msgs::PointCloudPacked &_msg,
128 bool _result);
129
132 public: Q_INVOKABLE QStringList PointCloudTopicList() const;
133
136 public: Q_INVOKABLE void SetPointCloudTopicList(
137 const QStringList &_pointCloudTopicList);
138
140 signals: void PointCloudTopicListChanged();
141
144 public: Q_INVOKABLE void OnPointCloudTopic(const QString &_topicName);
145
148 public: void OnFloatV(const msgs::Float_V &_msg);
149
153 public: void OnFloatVService(const msgs::Float_V &_msg, bool _result);
154
157 public: Q_INVOKABLE QStringList FloatVTopicList() const;
158
161 public: Q_INVOKABLE void SetFloatVTopicList(
162 const QStringList &_floatVTopicList);
163
165 signals: void FloatVTopicListChanged();
166
169 public: Q_INVOKABLE void OnFloatVTopic(const QString &_topicName);
170
173 public: Q_INVOKABLE QColor MinColor() const;
174
177 public: Q_INVOKABLE void SetMinColor(const QColor &_minColor);
178
180 signals: void MinColorChanged();
181
184 public: Q_INVOKABLE QColor MaxColor() const;
185
188 public: Q_INVOKABLE void SetMaxColor(const QColor &_maxColor);
189
191 signals: void MaxColorChanged();
192
195 public: Q_INVOKABLE float MinFloatV() const;
196
199 public: Q_INVOKABLE void SetMinFloatV(float _minFloatV);
200
202 signals: void MinFloatVChanged();
203
206 public: Q_INVOKABLE float MaxFloatV() const;
207
210 public: Q_INVOKABLE void SetMaxFloatV(float _maxFloatV);
211
213 signals: void MaxFloatVChanged();
214
217 public: Q_INVOKABLE float PointSize() const;
218
221 public: Q_INVOKABLE void SetPointSize(float _pointSize);
222
224 signals: void PointSizeChanged();
225
228 public: Q_INVOKABLE void Show(bool _show);
229
231 public: Q_INVOKABLE void OnRefresh();
232
235 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
236 };
237} // namespace gz::gui::plugins
238
239#endif // GZ_GUI_PLUGINS_POINTCLOUD_HH_