summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 8ce1a4616..573517e70 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1322,6 +1322,34 @@ void QMLManager::deleteDive(int id)
changesNeedSaving();
}
+void QMLManager::copyDiveData(int id)
+{
+ m_copyPasteDive = get_dive_by_uniq_id(id);
+ if (!m_copyPasteDive) {
+ appendTextToLog("trying to copy non-existing dive");
+ 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;
+}
+
+void QMLManager::pasteDiveData(int id)
+{
+ struct dive *d = get_dive_by_uniq_id(id);
+ if (!d) {
+ appendTextToLog("trying to paste to non-existing dive");
+ return;
+ }
+ selective_copy_dive(m_copyPasteDive, d, what, false);
+ changesNeedSaving();
+}
+
void QMLManager::cancelDownloadDC()
{
import_thread_cancelled = true;