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 #include <RobotAPI/gui-plugins/DebugDrawerViewer/ui_DebugDrawerViewerWidget.h>
32 
33 namespace armarx
34 {
35  /**
36  \page RobotAPI-GuiPlugins-DebugDrawerViewer DebugDrawerViewer
37  \brief The DebugDrawerViewer listens on the DebugDrawer topic and visualizes all incoming data.
38  This GUI only displays the DebugDrawer content and nothing else.
39  The content is shown in the 3D Viewer Widget.
40 
41  API Documentation: \ref DebugDrawerViewerWidgetController
42 
43  \see DebugDrawerViewerGuiPlugin
44  */
45 
46  /**
47  * \class DebugDrawerViewerWidgetController
48  * \brief DebugDrawerViewerWidgetController
49  *
50  * Detailed description
51  */
53  public ArmarXComponentWidgetControllerTemplate<DebugDrawerViewerWidgetController>
54  {
55  Q_OBJECT
56 
57  public:
58  /// Controller Constructor
60 
61  /// Controller destructor
62  virtual ~DebugDrawerViewerWidgetController() override = default;
63 
64  /// @see ArmarXWidgetController::loadSettings()
65  void loadSettings(QSettings* settings) override;
66 
67  /// @see ArmarXWidgetController::saveSettings()
68  void saveSettings(QSettings* settings) override;
69 
70  /**
71  * Returns the Widget name displayed in the ArmarXGui to create an
72  * instance of this class.
73  */
74  static QString
76  {
77  return "Visualization.DebugDrawerViewer";
78  }
79 
80  /// @see armarx::Component::onInitComponent()
81  void onInitComponent() override;
82 
83  /// @see armarx::Component::onConnectComponent()
84  void onConnectComponent() override;
85 
86  void onExitComponent() override;
87 
88 
89  public slots:
90  /* QT slot declarations */
91 
92  signals:
93  /* QT signal declarations */
94 
95 
96  private slots:
97 
98  /// Clear all layers.
99  void on_btnClearAll_clicked();
100 
101  /// Clear the selected layer.
102  void on_btnClearLayer_clicked();
103 
104  /// Fetch the layer information and update the combo box items.
105  void updateComboClearLayer();
106 
107 
108  private:
109  /// Make an item text for a layer entry in the clear layer combo box.
110  static QString makeLayerItemText(const LayerInformation& layer);
111 
112 
113  private:
114  /// Widget Form
115  Ui::DebugDrawerViewerWidget widget;
116 
117  /// The debug drawer.
119 
120  SoSeparator* rootVisu;
121 
122  // ArmarXWidgetController interface
123  public:
124  SoNode* getScene() override;
125 
126  // ArmarXWidgetController interface
127  public:
128  static QIcon
130  {
131  return QIcon(":icons/Outline-3D-DebugDrawer.png");
132  }
133  };
134 } // namespace armarx
DebugDrawerComponent.h
armarx::DebugDrawerViewerWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: DebugDrawerViewerWidgetController.h:75
armarx::DebugDrawerViewerWidgetController
DebugDrawerViewerWidgetController.
Definition: DebugDrawerViewerWidgetController.h:52
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
IceInternal::Handle< DebugDrawerComponent >
ArmarXGuiPlugin.h
armarx::DebugDrawerViewerWidgetController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition: DebugDrawerViewerWidgetController.h:129
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
ImportExportComponent.h