ObjectPoseClientWidget.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  * @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
17  * @date 2021
18  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19  * GNU General Public License
20  */
21 
22 #pragma once
23 
24 #include <memory>
25 
26 #include <QWidget>
27 
28 #include <Eigen/Core>
29 
31 
32 
33 class QLabel;
34 class QPushButton;
35 
36 namespace IceInternal
37 {
38  template <typename T>
39  class ProxyHandle;
40 }
41 
43 {
44  class ObjectPoseStorageInterface;
45 }
46 
47 namespace armarx
48 {
49  class ManagedIceObject;
52 } // namespace armarx
53 
55 {
56 
57  class Connection
58  {
59  public:
60  Connection(ObjectPoseStorageInterfacePrx objectPoseStorageComponent);
61  ~Connection();
62 
64  std::string getConnectedName() const;
65 
67 
69  std::vector<ObjectInfo> getObjectInfo();
70 
71  private:
72  std::unique_ptr<ObjectPoseStorageInterfacePrx> _objectPoseStorageComponent;
73  std::unique_ptr<objpose::ObjectPoseClient> _objectPoseClient;
74  };
75 
76 } // namespace armarx::navigation::qt_plugins::location_graph_editor::objectposes
77 
79 
80 {
81 
82  class ObjectPoseClientWidget : public QWidget
83  {
84  Q_OBJECT
86 
87  public:
88  ObjectPoseClientWidget(ManagedIceObject& component, QWidget* parent = nullptr);
89 
90 
91  bool isConnected() const;
93 
94 
95  signals:
96 
97  void connected();
98 
99 
100  public slots:
101 
103 
104 
105  private:
106  ManagedIceObject& _component;
107  std::optional<objectposes::Connection> _connection;
108 
109  QLabel* _statusLabel = nullptr;
110  QPushButton* _connectButton = nullptr;
111  };
112 
113 } // namespace armarx::navigation::qt_plugins::location_graph_editor
IceProxy::armarx::objpose
Definition: ObjectPoseClientWidget.h:42
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection
Definition: ObjectPoseClientWidget.h:57
armarx::ObjectPoseStorageInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::objpose::ObjectPoseStorageInterface > ObjectPoseStorageInterfacePrx
Definition: ObjectPoseClientWidget.h:51
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::getObjectPoseMap
objpose::ObjectPoseMap getObjectPoseMap()
Definition: ObjectPoseClientWidget.cpp:69
armarx::ProxyType::component
@ component
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::getObjectInfo
std::vector< ObjectInfo > getObjectInfo()
Definition: ObjectPoseClientWidget.cpp:75
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::getObjectClient
objpose::ObjectPoseClient & getObjectClient()
Definition: ObjectPoseClientWidget.cpp:63
armarx::navigation::qt_plugins::location_graph_editor::ObjectPoseClientWidget::connection
objectposes::Connection & connection()
Definition: ObjectPoseClientWidget.cpp:113
armarx::objpose::ObjectPoseClient
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
Definition: ObjectPoseClient.h:18
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::getConnectedName
std::string getConnectedName() const
Definition: ObjectPoseClientWidget.cpp:57
armarx::navigation::qt_plugins::location_graph_editor::ObjectPoseClientWidget::ObjectPoseClientWidget
ObjectPoseClientWidget(ManagedIceObject &component, QWidget *parent=nullptr)
Definition: ObjectPoseClientWidget.cpp:81
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::~Connection
~Connection()
armarx::navigation::qt_plugins::location_graph_editor::ObjectPoseClientWidget::connectToObjectPoseComponent
void connectToObjectPoseComponent()
Definition: ObjectPoseClientWidget.cpp:119
armarx::navigation::qt_plugins::location_graph_editor
Definition: GuiGraph.cpp:29
IceInternal
Definition: InstrumentationI.h:16
armarx::navigation::qt_plugins::location_graph_editor::ObjectPoseClientWidget
Definition: ObjectPoseClientWidget.h:82
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
IceInternal::ProxyHandle
Definition: ObjectPoseClientWidget.h:39
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::getObjectPoseStorageComponent
ObjectPoseStorageInterfacePrx getObjectPoseStorageComponent() const
Definition: ObjectPoseClientWidget.cpp:49
armarx::navigation::qt_plugins::location_graph_editor::ObjectPoseClientWidget::isConnected
bool isConnected() const
Definition: ObjectPoseClientWidget.cpp:107
armarx::navigation::qt_plugins::location_graph_editor::objectposes::Connection::Connection
Connection(ObjectPoseStorageInterfacePrx objectPoseStorageComponent)
Definition: ObjectPoseClientWidget.cpp:36
types.h
armarx::navigation::qt_plugins::location_graph_editor::ObjectPoseClientWidget::connected
void connected()
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::objpose::ObjectPoseMap
std::map< ObjectID, ObjectPose > ObjectPoseMap
Definition: forward_declarations.h:21
armarx::navigation::qt_plugins::location_graph_editor::objectposes
Definition: ObjectPoseClientWidget.h:54