ArVizDrawerGuiWidgetController.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::ArVizDrawerGuiWidgetController
17  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * @date 2020
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
24 #include <functional>
25 
27 
30 
31 #include <RobotAPI/gui-plugins/ArVizDrawerGui/ui_ArVizDrawerGuiWidget.h>
33 
34 namespace armarx
35 {
36  class ElementWidgetBase;
37 
38  /**
39  \page RobotAPI-GuiPlugins-ArVizDrawerGui ArVizDrawerGui
40  \brief The ArVizDrawerGui allows visualizing ...
41 
42  \image html ArVizDrawerGui.png
43  The user can
44 
45  API Documentation \ref ArVizDrawerGuiWidgetController
46 
47  \see ArVizDrawerGuiGuiPlugin
48  */
49 
50  /**
51  * \class ArVizDrawerGuiWidgetController
52  * \brief ArVizDrawerGuiWidgetController brief one line description
53  *
54  * Detailed description
55  */
57  public armarx::ArmarXComponentWidgetControllerTemplate<ArVizDrawerGuiWidgetController>,
58  public virtual ArVizComponentPluginUser
59  {
60  Q_OBJECT
61  public:
63  virtual ~ArVizDrawerGuiWidgetController() = default;
64 
65  void
66  loadSettings(QSettings* settings) override
67  {
68  }
69 
70  void
71  saveSettings(QSettings* settings) override
72  {
73  }
74 
75  static QString
77  {
78  return "Visualization.ArVizDrawer";
79  }
80 
81  void
82  onInitComponent() override
83  {
84  }
85 
86  void onConnectComponent() override;
87  void onDisconnectComponent() override;
88 
89  protected:
90  void timerEvent(QTimerEvent* event) override;
91 
92  private slots:
93  void on_pushButtonElementAdd_clicked();
94 
95  private:
96  Ui::ArVizDrawerGuiWidget _ui;
97  std::atomic_bool _connected{false};
98  std::set<ElementWidgetBase*> _elements;
99  std::map<std::string, std::function<ElementWidgetBase*()>> _factory;
100  };
101 } // namespace armarx
ArVizComponentPlugin.h
armarx::ArVizDrawerGuiWidgetController::saveSettings
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
Definition: ArVizDrawerGuiWidgetController.h:71
armarx::ArVizDrawerGuiWidgetController::loadSettings
void loadSettings(QSettings *settings) override
Implement to load the settings that are part of the GUI configuration.
Definition: ArVizDrawerGuiWidgetController.h:66
armarx::ArVizDrawerGuiWidgetController
ArVizDrawerGuiWidgetController brief one line description.
Definition: ArVizDrawerGuiWidgetController.h:56
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
armarx::ArVizDrawerGuiWidgetController::GetWidgetName
static QString GetWidgetName()
Definition: ArVizDrawerGuiWidgetController.h:76
ArmarXGuiPlugin.h
armarx::ArVizDrawerGuiWidgetController::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ArVizDrawerGuiWidgetController.h:82
armarx::ArVizComponentPluginUser
Provides a ready-to-use ArViz client arviz as member variable.
Definition: ArVizComponentPlugin.h:35
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