QML UI: when on the dive list, action button now offers add dive

This seems like a useful default action when people are looking at the dive
list (and it's a request from a user to have this as a button instead of just
via the menu).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-01 22:31:33 -05:00
parent 7d62ce5295
commit 48362ae11a

View file

@ -171,7 +171,7 @@ Kirigami.ScrollablePage {
if (visible) {
page.mainAction = page.saveAction
} else {
page.mainAction = null
page.mainAction = page.addDiveAction
}
}
@ -215,6 +215,12 @@ Kirigami.ScrollablePage {
}
}
property QtObject addDiveAction: Action {
iconName: "list-add"
onTriggered: {
startAddDive()
}
}
property QtObject saveAction: Action {
iconName: "document-save"