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
33// C++ includes
34#include <memory>
35
36// ui_ArVizDrawerGuiWidget.h is included by the .cpp, not here: moc textually inlines every
37// #include it can resolve, and parsing the uic-generated header alongside this one
38// makes moc mis-qualify this class as Ui::armarx::*.
39namespace Ui
40{
41 class ArVizDrawerGuiWidget;
42}
43
44namespace armarx
45{
47
48 /**
49 \page RobotAPI-GuiPlugins-ArVizDrawerGui ArVizDrawerGui
50 \brief The ArVizDrawerGui allows visualizing ...
51
52 \image html ArVizDrawerGui.png
53 The user can
54
55 API Documentation \ref ArVizDrawerGuiWidgetController
56
57 \see ArVizDrawerGuiGuiPlugin
58 */
59
60 /**
61 * \class ArVizDrawerGuiWidgetController
62 * \brief ArVizDrawerGuiWidgetController brief one line description
63 *
64 * Detailed description
65 */
67 public armarx::ArmarXComponentWidgetControllerTemplate<ArVizDrawerGuiWidgetController>,
68 public virtual ArVizComponentPluginUser
69 {
70 Q_OBJECT
71 public:
73 // Defined in the .cpp, where Ui::ArVizDrawerGuiWidget is complete.
75
76 void
77 loadSettings(QSettings* settings) override
78 {
79 }
80
81 void
82 saveSettings(QSettings* settings) override
83 {
84 }
85
86 static QString
88 {
89 return "Visualization.ArVizDrawer";
90 }
91
92 void
93 onInitComponent() override
94 {
95 }
96
97 void onConnectComponent() override;
98 void onDisconnectComponent() override;
99
100 protected:
101 void timerEvent(QTimerEvent* event) override;
102
103 private slots:
104 void on_pushButtonElementAdd_clicked();
105
106 private:
107 std::unique_ptr<Ui::ArVizDrawerGuiWidget> _ui;
108 std::atomic_bool _connected{false};
109 std::set<ElementWidgetBase*> _elements;
110 std::map<std::string, std::function<ElementWidgetBase*()>> _factory;
111 };
112} // namespace armarx
#define ARMARXCOMPONENT_IMPORT_EXPORT
void onInitComponent() override
Pure virtual hook for the subclass.
void loadSettings(QSettings *settings) override
Implement to load the settings that are part of the GUI configuration.
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.