Allow launching custom pages from main menu entries
This commit is contained in:
parent
0fbfaefcbe
commit
82dfceb953
@ -15,6 +15,7 @@ Drawer {
|
|||||||
signal openMagicSettings();
|
signal openMagicSettings();
|
||||||
signal openAppSettings();
|
signal openAppSettings();
|
||||||
signal openSystemSettings();
|
signal openSystemSettings();
|
||||||
|
signal openCustomPage(string page);
|
||||||
signal configureMainView();
|
signal configureMainView();
|
||||||
|
|
||||||
signal startWirelessSetup();
|
signal startWirelessSetup();
|
||||||
@ -215,6 +216,10 @@ Drawer {
|
|||||||
iconName: entry.iconName
|
iconName: entry.iconName
|
||||||
progressive: false
|
progressive: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
if (entry.page !== undefined) {
|
||||||
|
root.openCustomPage(entry.page)
|
||||||
|
}
|
||||||
|
|
||||||
if (entry.func !== undefined) {
|
if (entry.func !== undefined) {
|
||||||
entry.func(app, root.currentEngine)
|
entry.func(app, root.currentEngine)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,6 +121,7 @@ ApplicationWindow {
|
|||||||
onOpenMagicSettings: rootItem.openMagicSettings();
|
onOpenMagicSettings: rootItem.openMagicSettings();
|
||||||
onOpenAppSettings: rootItem.openAppSettings();
|
onOpenAppSettings: rootItem.openAppSettings();
|
||||||
onOpenSystemSettings: rootItem.openSystemSettings();
|
onOpenSystemSettings: rootItem.openSystemSettings();
|
||||||
|
onOpenCustomPage: rootItem.openCustomPage(page);
|
||||||
onConfigureMainView: rootItem.configureMainView();
|
onConfigureMainView: rootItem.configureMainView();
|
||||||
onStartManualConnection: rootItem.startManualConnection();
|
onStartManualConnection: rootItem.startManualConnection();
|
||||||
onStartWirelessSetup: rootItem.startWirelessSetup();
|
onStartWirelessSetup: rootItem.startWirelessSetup();
|
||||||
|
|||||||
@ -70,6 +70,10 @@ Item {
|
|||||||
function openSystemSettings() {
|
function openSystemSettings() {
|
||||||
d.pushSettingsPage("SettingsPage.qml")
|
d.pushSettingsPage("SettingsPage.qml")
|
||||||
}
|
}
|
||||||
|
function openCustomPage(page) {
|
||||||
|
d.pushSettingsPage(page)
|
||||||
|
}
|
||||||
|
|
||||||
function configureMainView() {
|
function configureMainView() {
|
||||||
swipeView.currentItem.pageStack.pop(null)
|
swipeView.currentItem.pageStack.pop(null)
|
||||||
swipeView.currentItem.pageStack.currentItem.configureViews()
|
swipeView.currentItem.pageStack.currentItem.configureViews()
|
||||||
|
|||||||
Reference in New Issue
Block a user