PointCloudVisualizationWidgetController.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 VisionX::gui-plugins::PointCloudVisualizationWidgetController
17 * @author Peter Kaiser ( peter dot kaiser at kit dot edu )
18 * @date 2017
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25#include <QTimer>
26
28
31
32#include <VisionX/gui-plugins/PointCloudVisualization/ui_PointCloudVisualizationWidget.h>
33#include <VisionX/interface/components/PointCloudVisualization.h>
34
36
37namespace armarx
38{
39 /**
40 \page VisionX-GuiPlugins-PointCloudVisualization PointCloudVisualization
41 \brief The PointCloudVisualization allows visualizing point clouds provided by configured PointCloudProviders using a DebugDrawer topic
42
43 API Documentation \ref PointCloudVisualizationWidgetController
44
45 \see PointCloudVisualizationGuiPlugin
46 */
47
48 /**
49 * \class PointCloudVisualizationWidgetController
50 * \brief PointCloudVisualizationWidgetController brief one line description
51 *
52 * Detailed description
53 */
55 public ArmarXComponentWidgetControllerTemplate<PointCloudVisualizationWidgetController>
56 {
57 Q_OBJECT
58
59 public:
60 /**
61 * Controller Constructor
62 */
64
65 /**
66 * Controller destructor
67 */
69
70 /**
71 * @see ArmarXWidgetController::loadSettings()
72 */
73 void loadSettings(QSettings* settings) override;
74
75 /**
76 * @see ArmarXWidgetController::saveSettings()
77 */
78 void saveSettings(QSettings* settings) override;
79
80 QPointer<QDialog> getConfigDialog(QWidget* parent = 0) override;
81
82 void configured() override;
83
84 /**
85 * Returns the Widget name displayed in the ArmarXGui to create an
86 * instance of this class.
87 */
88 static QString
90 {
91 return "VisionX.PointCloudVisualization";
92 }
93
94 static QIcon
96 {
97 return QIcon{"://icons/point_cloud_visu.svg"};
98 }
99
100 /**
101 * \see armarx::Component::onInitComponent()
102 */
103 void onInitComponent() override;
104
105 /**
106 * \see armarx::Component::onConnectComponent()
107 */
108 void onConnectComponent() override;
109
110 void onDisconnectComponent() override;
111
112 protected:
113 void updateProviderList();
114
115 public slots:
116 void providerSelectionChanged();
117 void providerVisualizationTypeChanged(int x);
118 void updateProviderTable();
119
120 signals:
122
123 private:
124 void rebuildProviderTable();
125 /**
126 * Widget Form
127 */
128 Ui::PointCloudVisualizationWidget widget;
129 QPointer<PointCloudVisualizationConfigDialog> configDialog;
130
131 std::string visualizerName;
132 visionx::PointCloudVisualizationInterfacePrx visualizer;
133
134 visionx::PointCloudProviderVisualizationInfoList providers;
135
136 QTimer updateTimer;
137 };
138} // namespace armarx
#define ARMARXCOMPONENT_IMPORT_EXPORT
QPointer< QDialog > getConfigDialog(QWidget *parent=0) override
getConfigDialog returns a pointer to the a configuration widget of this controller.
void configured() override
This function must be implemented by the user, if he supplies a config dialog.
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
This file offers overloads of toIce() and fromIce() functions for STL container types.