diff options
author | Grace Karanja <gracie.karanja89@gmail.com> | 2015-08-10 08:35:47 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-31 15:24:14 -0700 |
commit | 8d03d264807930b110f3f3f62f5fd42887f80e3e (patch) | |
tree | 2aa6e5b7fea821c2092195aabeff87e6e902dc77 /qt-mobile | |
parent | 10d8a625d0966b748690325e82bd2b9278a5c7f4 (diff) | |
download | subsurface-8d03d264807930b110f3f3f62f5fd42887f80e3e.tar.gz |
QML UI: Start Add Dive feature
Start working on the add dive feature, to enable the user add a
new dive using the mobile UI.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/DiveDetails.qml | 4 | ||||
-rw-r--r-- | qt-mobile/main.qml | 10 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 6 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.h | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/qt-mobile/DiveDetails.qml b/qt-mobile/DiveDetails.qml index 3c5120a85..83eccf372 100644 --- a/qt-mobile/DiveDetails.qml +++ b/qt-mobile/DiveDetails.qml @@ -27,6 +27,10 @@ Item { qmlProfile.update() } + function clearDetails() { + + } + Flickable { id: flick width: parent.width diff --git a/qt-mobile/main.qml b/qt-mobile/main.qml index 24ebb40ed..76d8836ed 100644 --- a/qt-mobile/main.qml +++ b/qt-mobile/main.qml @@ -37,6 +37,16 @@ ApplicationWindow { stackView.push(downloadDivesWindow) } } + + MenuItem { + text: "Add Dive" + onTriggered: { + manager.addDive(); + detailsWindow.clearDetails() + stackView.push(detailsWindow) + } + } + MenuItem { text: "Save Changes" onTriggered: { diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 203dcde20..69282ee90 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -126,6 +126,12 @@ void QMLManager::saveChanges() set_filename(fileName.toUtf8().data(), true); mark_divelist_changed(false); } + +void QMLManager::addDive() +{ + +} + bool QMLManager::saveCloudPassword() const { return m_saveCloudPassword; diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index 0f1df2b59..4bd8488e8 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -28,6 +28,7 @@ public slots: void loadDives(); void commitChanges(QString diveId, QString suit, QString buddy, QString diveMaster, QString notes); void saveChanges(); + void addDive(); private: QString m_cloudUserName; QString m_cloudPassword; |