ClockWidgetController.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package ArmarXGui::gui-plugins::ClockWidgetController
19
* @author Clemens Wallrath ( uagzs at student dot kit dot edu )
20
* @date 2015
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
25
#pragma once
26
27
#include <ArmarXGui/gui-plugins/ClockPlugin/ui_ClockWidget.h>
28
29
#include <
ArmarXGui/libraries/ArmarXGuiBase/ArmarXGuiPlugin.h
>
30
#include <
ArmarXGui/libraries/ArmarXGuiBase/ArmarXComponentWidgetController.h
>
31
32
#include <
ArmarXCore/core/system/ImportExportComponent.h
>
33
#include <ArmarXCore/interface/core/TimeServerInterface.h>
34
35
#include <QTimer>
36
37
namespace
armarx
38
{
68
class
ARMARXCOMPONENT_IMPORT_EXPORT
69
ClockWidgetController
:
70
public
ArmarXComponentWidgetControllerTemplate
<ClockWidgetController>
71
{
72
Q_OBJECT
73
74
public
:
78
explicit
ClockWidgetController
();
79
83
~
ClockWidgetController
()
override
;
84
88
void
loadSettings(QSettings* settings)
override
;
89
93
void
saveSettings(QSettings* settings)
override
;
94
99
static
QString
GetWidgetName
()
100
{
101
return
"Clock"
;
102
}
103
107
void
onInitComponent()
override
;
108
112
void
onConnectComponent()
override
;
113
117
void
onDisconnectComponent()
override
;
118
119
public
slots:
120
/* QT slot declarations */
121
void
updateGui();
122
void
startButtonPressed();
123
void
stepButtonPressed();
124
void
stopButtonPressed();
125
void
speedChanged(
double
newSpeed);
126
127
signals:
128
/* QT signal declarations */
129
130
private
:
134
Ui::ClockWidget widget;
135
QTimer* updateTimer;
136
TimeServerInterfacePtr timeServerPtr;
137
138
IceUtil::Time
lastChangeSystemTime;
139
IceUtil::Time
lastChangeTime;
140
144
size_t
iteration;
145
146
// ArmarXWidgetController interface
147
public
:
148
static
QIcon
GetWidgetIcon
()
149
{
150
return
QIcon(
":icons/Time-And-Date-Clock-icon.png"
);
151
}
152
};
153
}
154
armarx::ClockWidgetController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition:
ClockWidgetController.h:148
armarx::ArmarXComponentWidgetControllerTemplate
Definition:
ArmarXComponentWidgetController.h:69
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition:
ImportExportComponent.h:38
armarx::armem::Time
armarx::core::time::DateTime Time
Definition:
forward_declarations.h:13
armarx::ClockWidgetController
ClockWidgetController allows showing and manipulating the time.
Definition:
ClockWidgetController.h:68
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
armarx::ClockWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition:
ClockWidgetController.h:99
ImportExportComponent.h
ArmarXGui
gui-plugins
ClockPlugin
ClockWidgetController.h
Generated on Fri Sep 29 2023 06:18:18 for armarx_documentation by
1.8.17