]> vaikene.ee Git - evaf/blob - src/apps/ScosTime/gui.h
Ported to Qt5
[evaf] / src / apps / ScosTime / gui.h
1 /**
2 * @file ScosTime/gui.h
3 * @brief GUI for the ScosTime application
4 * @author Enar Vaikene
5 *
6 * Copyright (c) 2012 Enar Vaikene
7 *
8 * This file is part of the eVaf C++ cross-platform application development framework.
9 *
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
15 *
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
18 */
19
20 #ifndef __SCOSTIME_GUI_H
21 # define __SCOSTIME_GUI_H
22
23 #include "version.h"
24
25 #include <Plugins/iPlugin>
26
27 #include <QObject>
28 #include <QString>
29 #include <QDateTime>
30
31 class QLineEdit;
32 class QComboBox;
33
34 namespace eVaf {
35 namespace ScosTime {
36
37 /**
38 * Graphical User Interface for the ScosTime application.
39 *
40 * This module adds a GUI window to the ScosTime application using the SdiWindow module.
41 */
42 class Module : public Plugins::iPlugin
43 {
44 Q_OBJECT
45 Q_INTERFACES(eVaf::Plugins::iPlugin)
46 Q_PLUGIN_METADATA(IID VER_MODULE_NAME_STR)
47
48 public:
49
50 Module();
51
52 virtual ~Module();
53
54 virtual bool init(const QString & args);
55
56 virtual void done();
57
58 virtual bool isReady() const { return mReady; }
59
60
61 private slots:
62
63 void dateTimeClicked();
64
65 void hexClicked();
66
67
68 private: // Methods
69
70 QDateTime strToDateTime(QString const & s) const;
71
72 private: // Members
73
74 /// Flag indicating that the module is ready
75 bool mReady;
76
77 /// Widgets on the screen
78 QComboBox * wEpoch;
79 QLineEdit * wDateTime;
80 QLineEdit * wHex;
81
82 };
83
84 } // namespace eVaf::ScosTime
85 } // namespace eVaf
86
87 #endif // gui.h