aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlmanager.h
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-06-04 13:29:50 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-20 14:19:42 -0700
commit59be048549cfe620d0ddfcd891e04ec6e2fad3f7 (patch)
treec0edbbe5e28d159bf1111748e8018bd4240baa98 /qt-mobile/qmlmanager.h
parent6ba5b45c004e19b2845acdb549d727f3c80b5c51 (diff)
downloadsubsurface-59be048549cfe620d0ddfcd891e04ec6e2fad3f7.tar.gz
Add QMLManager class
Add a QMLManager class. This class will be used as a link between the C++ and QML aspects of the mobile application. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.h')
-rw-r--r--qt-mobile/qmlmanager.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h
new file mode 100644
index 000000000..e74db0b9a
--- /dev/null
+++ b/qt-mobile/qmlmanager.h
@@ -0,0 +1,31 @@
+#ifndef QMLMANAGER_H
+#define QMLMANAGER_H
+
+#include <QObject>
+#include <QString>
+
+class QMLManager : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged)
+public:
+ QMLManager();
+ ~QMLManager();
+
+ QString filename();
+
+ void getFile();
+
+
+public slots:
+ void setFilename(const QString &f);
+
+private:
+ QString m_fileName;
+ void loadFile();
+
+signals:
+ void filenameChanged();
+};
+
+#endif