QML UI: implement undelete

This code is very similar to the undo code in the desktop UI, but
untangling that from the desktop seemed massive overkill; we don't have
lists of dives to delete and undelete here - so this is actually much
simpler and easier to maintain (I hope).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-29 06:53:26 -08:00
parent e39e9eee3b
commit abab031ed2
3 changed files with 59 additions and 3 deletions

View file

@ -92,6 +92,7 @@ public slots:
void saveChanges();
void deleteDive(int id);
void undoDelete(int id);
QString addDive();
void addDiveAborted(int id);
void applyGpsData();
@ -125,6 +126,8 @@ private:
static QMLManager *m_instance;
QNetworkReply *reply;
QNetworkRequest request;
struct dive *deletedDive;
struct dive_trip *deletedTrip;
credentialStatus_t m_credentialStatus;