diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2018-10-27 10:21:40 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-11-18 06:31:44 +0800 |
commit | 76a68f71a4c25297dd65266e1ad5f2da4d80bac1 (patch) | |
tree | 2679585480fb09d7de6b976a79850e953e86e485 /mobile-widgets/qmlmanager.h | |
parent | 49d11443362eaa7e6185a1dda6d11c8b8d11fc60 (diff) | |
download | subsurface-76a68f71a4c25297dd65266e1ad5f2da4d80bac1.tar.gz |
Support for copy-pasting specific fields on mobile
Initial implementation/prototype of copy-paste support for
Subsurface-mobile. The UI part is really lacking; right now the copy
button is initially visible and paste is achieved by long press on a
dive and clicking the paste button when it appears. Delete is currently
not possible at all, as I just failed to layout the buttons properly
using QML. It just sounds so simple, to put all the copy-paste-delete
buttons next to each other...
The data to be copied is currently hard-coded. A dialog to choose
inteded fields would be nice, but it'll take quite a bit effort to get
used to QML enough to be able to hack something together.
Anyway, this seems to work, even though the UI is not always reflecting
the paste without switching dives (when testing on laptop).
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'mobile-widgets/qmlmanager.h')
-rw-r--r-- | mobile-widgets/qmlmanager.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 98282425d..ca638e02c 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -163,6 +163,8 @@ public slots: void saveChangesLocal(); void saveChangesCloud(bool forceRemoteSync); void deleteDive(int id); + void copyDiveData(int id); + void pasteDiveData(int id); bool undoDelete(int id); QString addDive(); void addDiveAborted(int id); @@ -224,6 +226,8 @@ private: bool m_btEnabled; void updateAllGlobalLists(); QString m_pluggedInDeviceName; + struct dive *m_copyPasteDive; + struct dive_components what; #if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) QString appLogFileName; |