diff options
Diffstat (limited to 'qt-mobile/qml/DiveDetails.qml')
-rw-r--r-- | qt-mobile/qml/DiveDetails.qml | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index 83a8b3a93..43b6c5e88 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -25,6 +25,7 @@ MobileComponents.Page { property alias startpressure: detailsEdit.startpressureText property alias endpressure: detailsEdit.endpressureText property alias gasmix: detailsEdit.gasmixText + property QtObject notificationComponent state: "view" @@ -63,8 +64,13 @@ MobileComponents.Page { iconName: "trash-empty" onTriggered: { manager.deleteDive(diveDetailsListView.currentItem.modelData.dive.id) - stackView.pop() + var notification = notificationComponent.createObject(contentItem.parent); + notification.showNotification("Dive deleted", 3000, "Undo", + function() { + print("now I need to undo!") + }); contextDrawer.close() + stackView.pop() } } ] @@ -187,4 +193,12 @@ MobileComponents.Page { id: detailsEdit } } + Component.onCompleted: { + notificationComponent = Qt.createComponent("PassiveNotification.qml"); + if( notificationComponent.status != Component.Ready ) { + print("notificationComponent isn't ready with status " + notificationComponent.status) + if( notificationComponent.status == Component.Error ) + print("Error:"+ notificationComponent.errorString() ); + } + } } |