IceGridViewer.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 ArmarX::
17* @author Manfred Kroehnert ( manfred.kroehnert at kit dot edu)
18* @date 2013
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
25#include <QStringListModel>
26#include <QWidget>
27
28#include <IceGrid/Admin.h>
29
31
32namespace Ui
33{
34 class IceGridViewer;
35}
36
37class NodeInfoModel;
38class ServerInfoModel;
40
41namespace armarx
42{
43 /**
44 \page ArmarXGui-GuiPlugins-IceGridViewer IceGridViewer
45 * \brief The IceGridViewer shows the current state of a running IceGrid instance.
46 * \image html IceGridViewer.png
47 * The IceGridViewer shows the current state of a running IceGrid instance.
48 * ArmarXGui Documentation \ref IceGridViewer
49 * \see SystemStateMonitorPlugin
50 */
51 /**
52 * \class IceGridViewer
53 */
55 {
56 Q_OBJECT
57
58 public:
59 explicit IceGridViewer();
60 ~IceGridViewer() override;
61
62 /**
63 * Load stored manager models
64 */
65 void loadSettings(QSettings* settings) override;
66
67 /**
68 * Saves the manager models
69 */
70 void saveSettings(QSettings* settings) override;
71
72 /**
73 * Returns the Widget name displayed in the ArmarXGui to create an
74 * instance of this.
75 */
76 static QString
78 {
79 return "Meta.IceGridViewer";
80 }
81
82 /**
83 * @see armarx::Component::onInitComponent()
84 */
85 void onInitComponent() override;
86
87 /**
88 * @see armarx::Component::onConnectComponent()
89 */
90 void onConnectComponent() override;
91 void onExitComponent() override;
92
93 signals:
94
95 public slots:
96 void gridNodeListUpdate(const IceGrid::NodeDynamicInfoSeq& nodeSeq);
97 void selectGridNode(int index);
98 void gridNodeListAdd(const IceGrid::NodeDynamicInfo& node);
99 void gridNodeListRemove(const QString& node);
100 void updateServerInfo(const std::string& nodeName,
101 const IceGrid::ServerDynamicInfo& serverUpdateInfo);
102 void updateAdapterInfo(const std::string& nodeName,
103 const IceGrid::AdapterDynamicInfo& adapterUpdateInfo);
104
105 protected slots:
106 void serverInfoChanged(IceGrid::ServerDynamicInfo serverInfo);
107
108 private:
109 Ui::IceGridViewer* ui;
110
111 const std::string ADAPTER_NAME;
112 armarx::IceGridAdminPtr iceGridAdmin;
113 Ice::ObjectAdapterPtr observerAdapter;
114
115 IceGrid::NodeDynamicInfoSeq gridNodeList;
116 NodeInfoModel* nodeInfoModel;
117 ServerInfoModel* serverInfoModel;
118 AdapterInfoModel* adapterInfoModel;
119 QStringListModel* selectorModel;
120 };
121} // namespace armarx
uint8_t index
void onInitComponent() override
void gridNodeListAdd(const IceGrid::NodeDynamicInfo &node)
void loadSettings(QSettings *settings) override
Load stored manager models.
void saveSettings(QSettings *settings) override
Saves the manager models.
void gridNodeListRemove(const QString &node)
void updateServerInfo(const std::string &nodeName, const IceGrid::ServerDynamicInfo &serverUpdateInfo)
void onConnectComponent() override
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this.
void onExitComponent() override
Hook for subclass.
void serverInfoChanged(IceGrid::ServerDynamicInfo serverInfo)
void selectGridNode(int index)
void gridNodeListUpdate(const IceGrid::NodeDynamicInfoSeq &nodeSeq)
void updateAdapterInfo(const std::string &nodeName, const IceGrid::AdapterDynamicInfo &adapterUpdateInfo)
::IceInternal::Handle<::Ice::ObjectAdapter > ObjectAdapterPtr
Definition IceManager.h:52
ArmarX Headers.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< IceGridAdmin > IceGridAdminPtr
Definition ArmarXFwd.h:48