diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2018-11-18 07:42:15 +0200 |
---|---|---|
committer | mturkia <miika.turkia@gmail.com> | 2018-12-21 09:13:37 +0200 |
commit | 8e7a9a4f4cdd4daba1fc1f45a38707b93dfb369d (patch) | |
tree | 5b4cd6b991a3c2eddff24ade9babe46035d8ee79 /mobile-widgets/qmlmanager.cpp | |
parent | de813c27ce402a099f2b035235a7a27da06f649e (diff) | |
download | subsurface-8e7a9a4f4cdd4daba1fc1f45a38707b93dfb369d.tar.gz |
Mobile: UI for selecting what to copy-paste
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 88 |
1 files changed, 80 insertions, 8 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index f2f5fe897..a133a5479 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1317,6 +1317,86 @@ void QMLManager::deleteDive(int id) changesNeedSaving(); } +bool QMLManager::toggleDiveSite(bool toggle) +{ + if (toggle) + what.divesite = what.divesite ? false : true; + + return what.divesite; +} + +bool QMLManager::toggleNotes(bool toggle) +{ + if (toggle) + what.notes = what.notes ? false : true; + + return what.notes; +} + +bool QMLManager::toggleDiveMaster(bool toggle) +{ + if (toggle) + what.divemaster = what.divemaster ? false : true; + + return what.divemaster; +} + +bool QMLManager::toggleBuddy(bool toggle) +{ + if (toggle) + what.buddy = what.buddy ? false : true; + + return what.buddy; +} + +bool QMLManager::toggleSuit(bool toggle) +{ + if (toggle) + what.suit = what.suit ? false : true; + + return what.suit; +} + +bool QMLManager::toggleRating(bool toggle) +{ + if (toggle) + what.rating = what.rating ? false : true; + + return what.rating; +} + +bool QMLManager::toggleVisibility(bool toggle) +{ + if (toggle) + what.visibility = what.visibility ? false : true; + + return what.visibility; +} + +bool QMLManager::toggleTags(bool toggle) +{ + if (toggle) + what.tags = what.tags ? false : true; + + return what.tags; +} + +bool QMLManager::toggleCylinders(bool toggle) +{ + if (toggle) + what.cylinders = what.cylinders ? false : true; + + return what.cylinders; +} + +bool QMLManager::toggleWeights(bool toggle) +{ + if (toggle) + what.weights = what.weights ? false : true; + + return what.weights; +} + void QMLManager::copyDiveData(int id) { m_copyPasteDive = get_dive_by_uniq_id(id); @@ -1325,14 +1405,6 @@ void QMLManager::copyDiveData(int id) return; } - // TODO: selection dialog for the data to be copied - what.divemaster = true; - what.buddy = true; - what.suit = true; - what.tags = true; - what.cylinders = true; - what.weights = true; - setNotificationText("Copy"); } |