GuiHealthClientWidgetController.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::GuiHealthClientWidgetController
17  * @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
24 #include <RobotAPI/gui-plugins/GuiHealthClient/ui_GuiHealthClientWidget.h>
25 
28 
30 
31 #include <RobotAPI/interface/components/RobotHealthInterface.h>
33 #include <QTimer>
34 
35 namespace armarx
36 {
37  /**
38  \page RobotAPI-GuiPlugins-GuiHealthClient GuiHealthClient
39  \brief The GuiHealthClient allows visualizing ...
40 
41  \image html GuiHealthClient.png
42  The user can
43 
44  API Documentation \ref GuiHealthClientWidgetController
45 
46  \see GuiHealthClientGuiPlugin
47  */
48 
49  /**
50  * \class GuiHealthClientWidgetController
51  * \brief GuiHealthClientWidgetController brief one line description
52  *
53  * Detailed description
54  */
57  public armarx::ArmarXComponentWidgetControllerTemplate < GuiHealthClientWidgetController >
58  {
59  Q_OBJECT
60 
61  public:
62  /**
63  * Controller Constructor
64  */
66 
67  /**
68  * Controller destructor
69  */
71 
72  /**
73  * @see ArmarXWidgetController::loadSettings()
74  */
75  void loadSettings(QSettings* settings) override;
76 
77  /**
78  * @see ArmarXWidgetController::saveSettings()
79  */
80  void saveSettings(QSettings* settings) override;
81 
82  /**
83  * Returns the Widget name displayed in the ArmarXGui to create an
84  * instance of this class.
85  */
86  static QString GetWidgetName()
87  {
88  return "GuiHealthClient";
89  }
90  static QIcon GetWidgetIcon()
91  {
92  return QIcon("://icons/heart.svg");
93  }
94 
95  /**
96  * \see armarx::Component::onInitComponent()
97  */
98  void onInitComponent() override;
99 
100  /**
101  * \see armarx::Component::onConnectComponent()
102  */
103  void onConnectComponent() override;
104 
105  void onDisconnectComponent() override;
106 
107 
108  protected slots:
109  void onConnectComponentQt();
110  void onDisconnectComponentQt();
111  void healthTimerClb();
112  void updateSummaryTimerClb();
113  void unrequireAll();
114 
115  signals:
116  /* QT signal declarations */
117  void invokeConnectComponentQt();
118  void invokeDisconnectComponentQt();
119 
120  private:
121  /**
122  * Widget Form
123  */
124  Ui::GuiHealthClientWidget widget;
125 
126  RobotHealthInterfacePrx robotHealthTopicPrx;
127  RobotHealthComponentInterfacePrx robotHealthComponentPrx;
128  QTimer* updateSummaryTimer;
129  };
130 }
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
armarx::GuiHealthClientWidgetController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition: GuiHealthClientWidgetController.h:90
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx::GuiHealthClientWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: GuiHealthClientWidgetController.h:86
TimeUtil.h
armarx::GuiHealthClientWidgetController
GuiHealthClientWidgetController brief one line description.
Definition: GuiHealthClientWidgetController.h:55
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
ImportExportComponent.h