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 <VisionX/gui-plugins/PointCloudVisualization/ui_PointCloudVisualizationWidget.h>
27 
30 
32 
33 #include <VisionX/interface/components/PointCloudVisualization.h>
34 
35 #include <QTimer>
36 
37 namespace 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  */
56  public ArmarXComponentWidgetControllerTemplate<PointCloudVisualizationWidgetController>
57  {
58  Q_OBJECT
59 
60  public:
61  /**
62  * Controller Constructor
63  */
65 
66  /**
67  * Controller destructor
68  */
70 
71  /**
72  * @see ArmarXWidgetController::loadSettings()
73  */
74  void loadSettings(QSettings* settings) override;
75 
76  /**
77  * @see ArmarXWidgetController::saveSettings()
78  */
79  void saveSettings(QSettings* settings) override;
80 
81  QPointer<QDialog> getConfigDialog(QWidget* parent = 0) override;
82 
83  void configured() override;
84 
85  /**
86  * Returns the Widget name displayed in the ArmarXGui to create an
87  * instance of this class.
88  */
89  static QString GetWidgetName()
90  {
91  return "VisionX.PointCloudVisualization";
92  }
93 
94  static QIcon GetWidgetIcon()
95  {
96  return QIcon {"://icons/point_cloud_visu.svg"};
97  }
98 
99  /**
100  * \see armarx::Component::onInitComponent()
101  */
102  void onInitComponent() override;
103 
104  /**
105  * \see armarx::Component::onConnectComponent()
106  */
107  void onConnectComponent() override;
108 
109  void onDisconnectComponent() override;
110 
111  protected:
112  void updateProviderList();
113 
114  public slots:
115  void providerSelectionChanged();
116  void providerVisualizationTypeChanged(int x);
117  void updateProviderTable();
118 
119  signals:
120  void providerListChanged();
121 
122  private:
123  void rebuildProviderTable();
124  /**
125  * Widget Form
126  */
127  Ui::PointCloudVisualizationWidget widget;
128  QPointer<PointCloudVisualizationConfigDialog> configDialog;
129 
130  std::string visualizerName;
131  visionx::PointCloudVisualizationInterfacePrx visualizer;
132 
133  visionx::PointCloudProviderVisualizationInfoList providers;
134 
135  QTimer updateTimer;
136  };
137 }
138 
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
armarx::PointCloudVisualizationWidgetController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition: PointCloudVisualizationWidgetController.h:94
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
PointCloudVisualizationConfigDialog.h
armarx::PointCloudVisualizationWidgetController
PointCloudVisualizationWidgetController brief one line description.
Definition: PointCloudVisualizationWidgetController.h:54
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::PointCloudVisualizationWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: PointCloudVisualizationWidgetController.h:89
ImportExportComponent.h