VisualizeFrustum.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 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_SIM_GUI_VISUALIZEFRUSTUM_HH_
19#define GZ_SIM_GUI_VISUALIZEFRUSTUM_HH_
20
21#include <memory>
22
23#include "gz/msgs/logical_camera_sensor.pb.h"
25#include "gz/gui/qt.h"
26
27namespace gz
28{
29namespace sim
30{
31// Inline bracket to help doxygen filtering.
32inline namespace GZ_SIM_VERSION_NAMESPACE
33{
34 class VisualizeFrustumPrivate;
35
38 {
39 Q_OBJECT
40
42 Q_PROPERTY(
43 QStringList topicList
44 READ TopicList
45 WRITE SetTopicList
46 NOTIFY TopicListChanged
47 )
48
49
51
53 public: ~VisualizeFrustum() override;
54
55 // Documentation inherited
56 public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override;
57
58 // Documentation Inherited
59 public: bool eventFilter(QObject *_obj, QEvent *_event) override;
60
61 // Documentation inherited
62 public: void Update(const UpdateInfo &,
63 EntityComponentManager &_ecm) override;
64
67 public: void OnScan(const msgs::LogicalCameraSensor &_msg);
68
70 public: void LoadFrustum();
71
74 public: Q_INVOKABLE QStringList TopicList() const;
75
79 public: Q_INVOKABLE void SetTopicList(const QStringList &_topicList);
80
82 signals: void TopicListChanged();
83
86 public: Q_INVOKABLE void OnTopic(const QString &_topicName);
87
90 public: Q_INVOKABLE void DisplayVisual(bool _value);
91
93 public: Q_INVOKABLE void OnRefresh();
94
97 private: std::unique_ptr<VisualizeFrustumPrivate> dataPtr;
98 };
99}
100}
101}
102#endif