DebugDrawerViewerWidgetController.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package RobotAPI::gui-plugins::DebugDrawerViewerWidgetController
17 * @author Mirko Waechter ( mirko dot waechter at kit dot edu )
18 * @date 2016
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
26
29
31
32// C++ includes
33#include <memory>
34
35// ui_DebugDrawerViewerWidget.h is included by the .cpp, not here: moc textually inlines every
36// #include it can resolve, and parsing the uic-generated header alongside this one
37// makes moc mis-qualify this class as Ui::armarx::*.
38namespace Ui
39{
40 class DebugDrawerViewerWidget;
41}
42
43namespace armarx
44{
45 /**
46 \page RobotAPI-GuiPlugins-DebugDrawerViewer DebugDrawerViewer
47 \brief The DebugDrawerViewer listens on the DebugDrawer topic and visualizes all incoming data.
48 This GUI only displays the DebugDrawer content and nothing else.
49 The content is shown in the 3D Viewer Widget.
50
51 API Documentation: \ref DebugDrawerViewerWidgetController
52
53 \see DebugDrawerViewerGuiPlugin
54 */
55
56 /**
57 * \class DebugDrawerViewerWidgetController
58 * \brief DebugDrawerViewerWidgetController
59 *
60 * Detailed description
61 */
63 public ArmarXComponentWidgetControllerTemplate<DebugDrawerViewerWidgetController>
64 {
65 Q_OBJECT
66
67 public:
68 /// Controller Constructor
70
71 /// Controller destructor
72 // Defined in the .cpp, where Ui::DebugDrawerViewerWidget is complete.
74
75 /// @see ArmarXWidgetController::loadSettings()
76 void loadSettings(QSettings* settings) override;
77
78 /// @see ArmarXWidgetController::saveSettings()
79 void saveSettings(QSettings* settings) override;
80
81 /**
82 * Returns the Widget name displayed in the ArmarXGui to create an
83 * instance of this class.
84 */
85 static QString
87 {
88 return "Visualization.DebugDrawerViewer";
89 }
90
91 /// @see armarx::Component::onInitComponent()
92 void onInitComponent() override;
93
94 /// @see armarx::Component::onConnectComponent()
95 void onConnectComponent() override;
96
97 void onExitComponent() override;
98
99 public slots:
100 /* QT slot declarations */
101
102 signals:
103 /* QT signal declarations */
104
105
106 private slots:
107
108 /// Clear all layers.
109 void on_btnClearAll_clicked();
110
111 /// Clear the selected layer.
112 void on_btnClearLayer_clicked();
113
114 /// Fetch the layer information and update the combo box items.
115 void updateComboClearLayer();
116
117
118 private:
119 /// Make an item text for a layer entry in the clear layer combo box.
120 static QString makeLayerItemText(const LayerInformation& layer);
121
122
123 private:
124 /// Widget Form
125 std::unique_ptr<Ui::DebugDrawerViewerWidget> widget;
126
127 /// The debug drawer.
129
130 SoSeparator* rootVisu;
131
132 // ArmarXWidgetController interface
133 public:
134 SoNode* getScene() override;
135
136 // ArmarXWidgetController interface
137 public:
138 static QIcon
140 {
141 return QIcon(":icons/Outline-3D-DebugDrawer.png");
142 }
143 };
144} // namespace armarx
#define ARMARXCOMPONENT_IMPORT_EXPORT
virtual ~DebugDrawerViewerWidgetController() override
Controller destructor.
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< DebugDrawerComponent > DebugDrawerComponentPtr