ObjectPoseGuiWidgetController.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::ObjectPoseGuiWidgetController
17 * @author Rainer Kartmann ( rainer dot kartmann 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
25
29
30#include <RobotAPI/gui-plugins/ObjectPoseGui/ui_ObjectPoseGuiWidget.h>
31#include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
32
33namespace armarx
34{
35 /**
36 @page RobotAPI-GuiPlugins-ObjectPoseGui ObjectPoseGui
37 @brief The ObjectPoseGui allows visualizing ...
38
39 @image html ObjectPoseGui.png
40 The user can
41
42 API Documentation @ref ObjectPoseGuiWidgetController
43
44 @see ObjectPoseGuiGuiPlugin
45 */
46
47 /**
48 * @class ObjectPoseGuiWidgetController
49 * @brief ObjectPoseGuiWidgetController brief one line description
50 *
51 * Detailed description
52 */
54 public armarx::ArmarXComponentWidgetControllerTemplate<ObjectPoseGuiWidgetController>
55 {
56 Q_OBJECT
57
58 public:
59 /// Controller Constructor
61
62 /// Controller destructor
63 virtual ~ObjectPoseGuiWidgetController() override;
64
65 /// Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
66 static QString GetWidgetName();
67
68
69 /// @see ArmarXWidgetController::loadSettings()
70 void loadSettings(QSettings* settings) override;
71 /// @see ArmarXWidgetController::saveSettings()
72 void saveSettings(QSettings* settings) override;
73
74
75 QPointer<QDialog> getConfigDialog(QWidget* parent) override;
76 void configured() override;
77
78
79 /// @see armarx::Component::onInitComponent()
80 void onInitComponent() override;
81
82 /// @see armarx::Component::onConnectComponent()
83 void onConnectComponent() override;
84
85 /// @see armarx::Component::onConnectComponent()
86 void onDisconnectComponent() override;
87
88
89 public slots:
90 /* QT slot declarations */
91
92 /// Update the currently opened tab.
93 void updateTab();
94 void updateObjectsTab();
95 void updateRequestTab();
96
97 void prepareObjectContextMenu(const QPoint& pos);
98 void attachObjectToRobotNode(QString providerName,
99 QString objectID,
100 const std::string& agentName,
101 const std::string& frameName);
102 void detachObjectFromRobotNode(QString providerName, QString objectID);
103 void detachAllObjectsFromRobotNodes(bool commitAttachedPose);
104
106
107
108 signals:
109 /* QT signal declarations */
110
111 private:
112 /// Widget Form
113 Ui::ObjectPoseGuiWidget widget;
114
115 QPointer<SimpleConfigDialog> configDialog;
116
117 std::string objectPoseStorageName;
118 armarx::objpose::ObjectPoseStorageInterfacePrx ObjectPoseStorage;
119
120 objpose::AgentFramesSeq attachableFrames;
121 };
122} // namespace armarx
#define ARMARXCOMPONENT_IMPORT_EXPORT
void updateTab()
Update the currently opened tab.
void loadSettings(QSettings *settings) override
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
void detachObjectFromRobotNode(QString providerName, QString objectID)
void detachAllObjectsFromRobotNodes(bool commitAttachedPose)
void attachObjectToRobotNode(QString providerName, QString objectID, const std::string &agentName, const std::string &frameName)
void configured() override
This function must be implemented by the user, if he supplies a config dialog.
QPointer< QDialog > getConfigDialog(QWidget *parent) override
getConfigDialog returns a pointer to the a configuration widget of this controller.
This file offers overloads of toIce() and fromIce() functions for STL container types.