import QtQuick 2.1 import QtQuick.Controls 2.0 as QQC2 import org.kde.kirigami 2.4 as Kirigami import Qt.labs.settings 1.0 import "qrc:js/functions.js" as ManifoldJS Kirigami.ApplicationWindow { id: root /* Load pages */ Component {id: feedPage; FeedPage {}} Component {id: maniphestPage; ManiphestPage {}} Component {id: macroPage; MacroPage {}} Component {id: testPage; TestPage {}} Component {id: settingsPage; SettingsPage {}} /* Load settings in a vain attempt to get pageStack.initialPage to work, currently still doesn't (see below) */ Settings { id: settings property string phab_url: "https://phabricator.example.com" property string api_token: "api-aaaaaaaaaaaaaaaaaaaaaaaaaaaa" } header: Kirigami.ApplicationHeader {} globalDrawer: Kirigami.GlobalDrawer { title: "Manifold" titleIcon: "applications-graphics" showContentWhenCollapsed: true actions: [ Kirigami.Action { text: "Feed" onTriggered: pageStack.replace(feedPage) }, Kirigami.Action { text: "Maniphest" onTriggered: pageStack.replace(maniphestPage) }, Kirigami.Action { text: "Macros" onTriggered: pageStack.replace(macroPage) }, Kirigami.Action { text: "Test" onTriggered: pageStack.replace(testPage) }, Kirigami.Action { text: "Settings" onTriggered: pageStack.replace(settingsPage) } ] } contextDrawer: Kirigami.ContextDrawer { id: contextDrawer } /* Not setting an initial page since weirdly settings aren't actually read yet. Dunno if I'm doing something wrong, or if there's just a reason why it's still in "labs"! */ // pageStack.initialPage: maniphestPage Component.onCompleted: { // Set some stuff Qt.application.name = "Manifold" Qt.application.domain = "keithzg.ca" Qt.application.organization = "keithzg" // Loading this later since, as mentioned above, earlier the settings aren't read pageStack.replace(macroPage) } }