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