ViewSelectionWidgetController.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::ViewSelectionWidgetController
17 * @author Markus Grotz ( markus dot grotz 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
30#include <RobotAPI/interface/components/ViewSelectionInterface.h>
31
33
34// C++ includes
35#include <memory>
36
37// ui_ViewSelectionWidget.h is included by the .cpp, not here: moc textually inlines every
38// #include it can resolve, and parsing the uic-generated header alongside this one
39// makes moc mis-qualify this class as Ui::armarx::*.
40namespace Ui
41{
42 class ViewSelectionWidget;
43}
44
45namespace armarx
46{
47
48 //class ViewSelectionConfigDialog;
49
50 /**
51 \page RobotAPI-GuiPlugins-ViewSelection ViewSelection
52 \brief The ViewSelection allows visualizing ...
53
54 \image html ViewSelection.png
55 The user can
56
57 API Documentation \ref ViewSelectionWidgetController
58
59 \see ViewSelectionGuiPlugin
60 */
61
62 /**
63 * \class ViewSelectionWidgetController
64 * \brief ViewSelectionWidgetController brief one line description
65 *
66 * Detailed description
67 */
69 public ArmarXComponentWidgetControllerTemplate<ViewSelectionWidgetController>,
70 public armarx::ViewSelectionObserver
71 {
72 Q_OBJECT
73
74 public:
75 /**
76 * Controller Constructor
77 */
79
80 /**
81 * Controller destructor
82 */
84
85 /**
86 * @see ArmarXWidgetController::loadSettings()
87 */
88 void loadSettings(QSettings* settings) override;
89
90 /**
91 * @see ArmarXWidgetController::saveSettings()
92 */
93 void saveSettings(QSettings* settings) override;
94
95 void configured() override;
96
97 void onActivateAutomaticViewSelection(const Ice::Current& c = Ice::emptyCurrent) override;
98 void onDeactivateAutomaticViewSelection(const Ice::Current& c = Ice::emptyCurrent) override;
99 void nextViewTarget(Ice::Long, const Ice::Current& c = Ice::emptyCurrent) override;
100
101 /**
102 * Returns the Widget name displayed in the ArmarXGui to create an
103 * instance of this class.
104 */
105 static QString
107 {
108 return "RobotControl.ViewSelection";
109 }
110
111 /**
112 * \see armarx::Component::onInitComponent()
113 */
114 void onInitComponent() override;
115
116 /**
117 * \see armarx::Component::onConnectComponent()
118 */
119 void onConnectComponent() override;
120
121
122 QPointer<QDialog> getConfigDialog(QWidget* parent) override;
123
124 public slots:
125
126 void triggerSaliencyMapVisualization();
127 void clearSaliencyMapVisualization();
128 void updateSaliencyMapNames();
129 void toggleViewSelection(bool enabled);
130 /* QT slot declarations */
131
132 signals:
133 /* QT signal declarations */
134
135 private:
136 /**
137 * Widget Form
138 */
139 std::unique_ptr<Ui::ViewSelectionWidget> widget;
140
141 QPointer<ViewSelectionConfigDialog> configDialog;
142
143 ViewSelectionInterfacePrx viewSelection;
144
145 std::string viewSelectionName;
146 };
147} // namespace armarx
#define ARMARXCOMPONENT_IMPORT_EXPORT
constexpr T c
void onDeactivateAutomaticViewSelection(const Ice::Current &c=Ice::emptyCurrent) override
void loadSettings(QSettings *settings) override
void saveSettings(QSettings *settings) override
void onActivateAutomaticViewSelection(const Ice::Current &c=Ice::emptyCurrent) override
void nextViewTarget(Ice::Long, const Ice::Current &c=Ice::emptyCurrent) override
void configured() override
This function must be implemented by the user, if he supplies a config dialog.
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.