]> vaikene.ee Git - evaf/blob - src/apps/ScosTime/gui.h
fe6b5e3f3dcad059f2b9c6d0f6983bf1570c4d26
[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 <Plugins/iPlugin>
24
25 #include <QObject>
26 #include <QString>
27 #include <QDateTime>
28
29 class QLineEdit;
30 class QComboBox;
31
32 namespace eVaf {
33 namespace ScosTime {
34
35 /**
36 * Graphical User Interface for the ScosTime application.
37 *
38 * This module adds a GUI window to the ScosTime application using the SdiWindow module.
39 */
40 class Module : public Plugins::iPlugin
41 {
42 Q_OBJECT
43 Q_INTERFACES(eVaf::Plugins::iPlugin)
44
45 public:
46
47 Module();
48
49 virtual ~Module();
50
51 virtual bool init(const QString & args);
52
53 virtual void done();
54
55 virtual bool isReady() const { return mReady; }
56
57
58 private slots:
59
60 void dateTimeClicked();
61
62 void hexClicked();
63
64
65 private: // Methods
66
67 QDateTime strToDateTime(QString const & s) const;
68
69 private: // Members
70
71 /// Flag indicating that the module is ready
72 bool mReady;
73
74 /// Widgets on the screen
75 QComboBox * wEpoch;
76 QLineEdit * wDateTime;
77 QLineEdit * wHex;
78
79 };
80
81 } // namespace eVaf::ScosTime
82 } // namespace eVaf
83
84 #endif // gui.h