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 
32 #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  */
58  public armarx::ArmarXComponentWidgetControllerTemplate < ArVizDrawerGuiWidgetController >,
59  public virtual ArVizComponentPluginUser
60  {
61  Q_OBJECT
62  public:
64  virtual ~ArVizDrawerGuiWidgetController() = default;
65 
66  void loadSettings(QSettings* settings) override {}
67  void saveSettings(QSettings* settings) override {}
68 
69  static QString GetWidgetName()
70  {
71  return "Visualization.ArVizDrawer";
72  }
73 
74  void onInitComponent() override {}
75  void onConnectComponent() override;
76  void onDisconnectComponent() override;
77 
78  protected:
79  void timerEvent(QTimerEvent* event) override;
80 
81  private slots:
82  void on_pushButtonElementAdd_clicked();
83 
84  private:
85  Ui::ArVizDrawerGuiWidget _ui;
86  std::atomic_bool _connected{false};
87  std::set<ElementWidgetBase*> _elements;
88  std::map<std::string, std::function<ElementWidgetBase*()>> _factory;
89  };
90 }
91 
92 
ArVizComponentPlugin.h
armarx::ArVizDrawerGuiWidgetController::saveSettings
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
Definition: ArVizDrawerGuiWidgetController.h:67
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:69
ArmarXGuiPlugin.h
armarx::ArVizDrawerGuiWidgetController::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ArVizDrawerGuiWidgetController.h:74
armarx::ArVizComponentPluginUser
Provides a ready-to-use ArViz client arviz as member variable.
Definition: ArVizComponentPlugin.h:36
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