]> vaikene.ee Git - evaf/blobdiff - src/apps/ScosTime/gui.h
Added a small utility that converts date/time values
[evaf] / src / apps / ScosTime / gui.h
diff --git a/src/apps/ScosTime/gui.h b/src/apps/ScosTime/gui.h
new file mode 100644 (file)
index 0000000..fe6b5e3
--- /dev/null
@@ -0,0 +1,84 @@
+/**
+ * @file ScosTime/gui.h
+ * @brief GUI for the ScosTime application
+ * @author Enar Vaikene
+ *
+ * Copyright (c) 2012 Enar Vaikene
+ *
+ * This file is part of the eVaf C++ cross-platform application development framework.
+ *
+ * This file can be used under the terms of the GNU General Public License
+ * version 3.0 as published by the Free Software Foundation and appearing in
+ * the file LICENSE included in the packaging of this file. Please review the
+ * the following information to ensure the GNU General Public License version
+ * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+ *
+ * Alternatively, this file may be used in accordance with the Commercial License
+ * Agreement provided with the Software.
+ */
+
+#ifndef __SCOSTIME_GUI_H
+#  define __SCOSTIME_GUI_H
+
+#include <Plugins/iPlugin>
+
+#include <QObject>
+#include <QString>
+#include <QDateTime>
+
+class QLineEdit;
+class QComboBox;
+
+namespace eVaf {
+namespace ScosTime {
+
+/**
+ * Graphical User Interface for the ScosTime application.
+ *
+ * This module adds a GUI window to the ScosTime application using the SdiWindow module.
+ */
+class Module : public Plugins::iPlugin
+{
+    Q_OBJECT
+    Q_INTERFACES(eVaf::Plugins::iPlugin)
+
+public:
+
+    Module();
+
+    virtual ~Module();
+
+    virtual bool init(const QString & args);
+
+    virtual void done();
+
+    virtual bool isReady() const { return mReady; }
+
+
+private slots:
+
+    void dateTimeClicked();
+
+    void hexClicked();
+
+
+private: // Methods
+
+    QDateTime strToDateTime(QString const & s) const;
+
+private: // Members
+
+    /// Flag indicating that the module is ready
+    bool mReady;
+
+    /// Widgets on the screen
+    QComboBox * wEpoch;
+    QLineEdit * wDateTime;
+    QLineEdit * wHex;
+
+};
+
+} // namespace eVaf::ScosTime
+} // namespace eVaf
+
+#endif // gui.h