implement new menu structure
This patch creates the following menu structure in the application menu as discussed on irc: Cloud credentials Preferences Manage dives Download from computer Add dive manually Refresh dives Upload to cloud GPS Add GPS tags to dives Upload GPS data Clear GPS cache Advanced (hidden by default) App log Theme Information "Save" moves out of the context menu, since it's a global thing (syncs to server). Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
bfcc4aaf05
commit
36e3c5485e
@ -44,15 +44,6 @@ MobileComponents.Page {
|
||||
]
|
||||
|
||||
contextualActions: [
|
||||
Action {
|
||||
text: "Save"
|
||||
enabled: diveDetailsWindow.state == "edit"
|
||||
iconName: "document-save"
|
||||
onTriggered: {
|
||||
manager.saveChanges();
|
||||
contextDrawer.close();
|
||||
}
|
||||
},
|
||||
Action {
|
||||
text: checked ? "View" : "Edit"
|
||||
checkable: true
|
||||
|
||||
@ -25,6 +25,12 @@ MobileComponents.ApplicationWindow {
|
||||
|
||||
bannerImageSource: "dive.jpg"
|
||||
actions: [
|
||||
Action {
|
||||
text: "Cloud credentials"
|
||||
onTriggered: {
|
||||
stackView.push(cloudCredWindow)
|
||||
}
|
||||
},
|
||||
Action {
|
||||
text: "Preferences"
|
||||
onTriggered: {
|
||||
@ -32,80 +38,76 @@ MobileComponents.ApplicationWindow {
|
||||
}
|
||||
},
|
||||
|
||||
Action {
|
||||
text: "Cloud login credentials"
|
||||
onTriggered: {
|
||||
stackView.push(cloudCredWindow)
|
||||
MobileComponents.ActionGroup {
|
||||
text: "Manage dives"
|
||||
Action {
|
||||
text: "Download from computer"
|
||||
onTriggered: {
|
||||
stackView.push(downloadDivesWindow)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Action {
|
||||
text: "Load Dives"
|
||||
onTriggered: {
|
||||
manager.loadDives();
|
||||
Action {
|
||||
text: "Add dive manually"
|
||||
onTriggered: {
|
||||
manager.addDive();
|
||||
stackView.push(detailsWindow)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Action {
|
||||
text: "Download Dives"
|
||||
onTriggered: {
|
||||
stackView.push(downloadDivesWindow)
|
||||
Action {
|
||||
text: "Refresh"
|
||||
onTriggered: {
|
||||
manager.loadDives();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Action {
|
||||
text: "Add Dive"
|
||||
onTriggered: {
|
||||
manager.addDive();
|
||||
stackView.push(detailsWindow)
|
||||
Action {
|
||||
text: "Upload to cloud"
|
||||
onTriggered: {
|
||||
manager.saveChanges();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
MobileComponents.ActionGroup {
|
||||
text: "GPS"
|
||||
Action {
|
||||
text: "Run location service"
|
||||
checkable: true
|
||||
checked: manager.locationServiceEnabled
|
||||
onToggled: {
|
||||
manager.locationServiceEnabled = checked;
|
||||
}
|
||||
}
|
||||
Action {
|
||||
text: "Apply GPS data to dives"
|
||||
text: "GPS-tag dives"
|
||||
onTriggered: {
|
||||
manager.applyGpsData();
|
||||
manager.applyGpsData();
|
||||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
text: "Send GPS data to server"
|
||||
text: "Upload GPS data"
|
||||
onTriggered: {
|
||||
manager.sendGpsData();
|
||||
manager.sendGpsData();
|
||||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
text: "Clear stored GPS data"
|
||||
text: "Clear GPS cache"
|
||||
onTriggered: {
|
||||
manager.clearGpsData();
|
||||
manager.clearGpsData();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Action {
|
||||
text: "View Log"
|
||||
onTriggered: {
|
||||
stackView.push(logWindow)
|
||||
MobileComponents.ActionGroup {
|
||||
text: "Developer"
|
||||
Action {
|
||||
text: "App log"
|
||||
onTriggered: {
|
||||
stackView.push(logWindow)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Action {
|
||||
text: "Theme Information"
|
||||
onTriggered: {
|
||||
stackView.push(themetest)
|
||||
Action {
|
||||
text: "Theme information"
|
||||
onTriggered: {
|
||||
stackView.push(themetest)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
] // end actions
|
||||
|
||||
MouseArea {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user