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/interface/objectpose/ObjectPoseStorageInterface.h>
31
32// C++ includes
33#include <memory>
34
35// ui_ObjectPoseGuiWidget.h is included by the .cpp, not here: moc textually inlines every
36// #include it can resolve, and parsing the uic-generated header alongside this one
37// makes moc mis-qualify this class as Ui::armarx::*.
38namespace Ui
39{
40 class ObjectPoseGuiWidget;
41}
42
43namespace armarx
44{
45 /**
46 @page RobotAPI-GuiPlugins-ObjectPoseGui ObjectPoseGui
47 @brief The ObjectPoseGui allows visualizing ...
48
49 @image html ObjectPoseGui.png
50 The user can
51
52 API Documentation @ref ObjectPoseGuiWidgetController
53
54 @see ObjectPoseGuiGuiPlugin
55 */
56
57 /**
58 * @class ObjectPoseGuiWidgetController
59 * @brief ObjectPoseGuiWidgetController brief one line description
60 *
61 * Detailed description
62 */
64 public armarx::ArmarXComponentWidgetControllerTemplate<ObjectPoseGuiWidgetController>
65 {
66 Q_OBJECT
67
68 public:
69 /// Controller Constructor
71
72 /// Controller destructor
73 virtual ~ObjectPoseGuiWidgetController() override;
74
75 /// Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
76 static QString GetWidgetName();
77
78 /// @see ArmarXWidgetController::loadSettings()
79 void loadSettings(QSettings* settings) override;
80 /// @see ArmarXWidgetController::saveSettings()
81 void saveSettings(QSettings* settings) override;
82
83
84 QPointer<QDialog> getConfigDialog(QWidget* parent) override;
85 void configured() override;
86
87
88 /// @see armarx::Component::onInitComponent()
89 void onInitComponent() override;
90
91 /// @see armarx::Component::onConnectComponent()
92 void onConnectComponent() override;
93
94 /// @see armarx::Component::onConnectComponent()
95 void onDisconnectComponent() override;
96
97
98 public slots:
99 /* QT slot declarations */
100
101 /// Update the currently opened tab.
102 void updateTab();
103 void updateObjectsTab();
104 void updateRequestTab();
105
106 void prepareObjectContextMenu(const QPoint& pos);
107 void attachObjectToRobotNode(QString providerName,
108 QString objectID,
109 const std::string& agentName,
110 const std::string& frameName);
111 void detachObjectFromRobotNode(QString providerName, QString objectID);
112 void detachAllObjectsFromRobotNodes(bool commitAttachedPose);
113
115
116
117 signals:
118 /* QT signal declarations */
119
120 private:
121 /// Widget Form
122 std::unique_ptr<Ui::ObjectPoseGuiWidget> widget;
123
124 QPointer<SimpleConfigDialog> configDialog;
125
126 std::string objectPoseStorageName;
127 armarx::objpose::ObjectPoseStorageInterfacePrx ObjectPoseStorage;
128
129 objpose::AgentFramesSeq attachableFrames;
130 };
131} // 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.
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.