menubar works for both global systems and default built in menubar
This commit is contained in:
parent
378fe37fb3
commit
16abd43dae
3 changed files with 58 additions and 36 deletions
|
@ -1,7 +1,7 @@
|
||||||
#+TITLE: Church Presenter
|
#+TITLE: Church Presenter
|
||||||
#+AUTHOR: Chris Cochrun
|
#+AUTHOR: Chris Cochrun
|
||||||
|
|
||||||
* Church Presenter
|
* Introduction
|
||||||
This is an attempt at building a church presentation application in Qt/QML. QML provides a very powerful and easy declarative way of creating a UI so it should also be a very simple method of creating on screen slides and presentations. This experiment is to see how difficult it is to rebuild these applications in QML as opposed to other more complicated systems. After digging through the source code of OpenLP, I discovered they are essentially creating a web server and rendering a webpage onto the screen to show slides. This felt like a waste of resources and added complexity when something so simple and useful as QML exists.
|
This is an attempt at building a church presentation application in Qt/QML. QML provides a very powerful and easy declarative way of creating a UI so it should also be a very simple method of creating on screen slides and presentations. This experiment is to see how difficult it is to rebuild these applications in QML as opposed to other more complicated systems. After digging through the source code of OpenLP, I discovered they are essentially creating a web server and rendering a webpage onto the screen to show slides. This felt like a waste of resources and added complexity when something so simple and useful as QML exists.
|
||||||
|
|
||||||
** Features (planned are in parentheses)
|
** Features (planned are in parentheses)
|
||||||
|
|
8
TODO.org
Normal file
8
TODO.org
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#+TITLE: Todo List
|
||||||
|
* Inbox
|
||||||
|
** TODO Need to make ListModel capable of bringing in a string list
|
||||||
|
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/LeftDock.qml::/* showPassiveNotification(serviceItemList.currentIndex); */]]
|
||||||
|
** TODO Parse Lyrics to create a list of strings for slides
|
||||||
|
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/LeftDock.qml::/* showPassiveNotification(serviceItemList.currentIndex); */]]
|
|
@ -26,30 +26,41 @@ Kirigami.ApplicationWindow {
|
||||||
pageStack.initialPage: mainPage
|
pageStack.initialPage: mainPage
|
||||||
header: Presenter.Header {}
|
header: Presenter.Header {}
|
||||||
|
|
||||||
/* menuBar: Qt.platform.os !== "linux" ? Controls.MenuBar { */
|
menuBar: Controls.MenuBar {
|
||||||
/* Controls.Menu { */
|
visible: !Kirigami.Settings.hasPlatformMenuBar
|
||||||
/* title: qsTr("File") */
|
Controls.Menu {
|
||||||
/* Controls.MenuItem { text: qsTr("New...") } */
|
title: qsTr("File")
|
||||||
/* Controls.MenuItem { text: qsTr("Open...") } */
|
Controls.MenuItem { text: qsTr("New...") }
|
||||||
/* Controls.MenuItem { text: qsTr("Save") } */
|
Controls.MenuItem { text: qsTr("Open...") }
|
||||||
/* Controls.MenuItem { text: qsTr("Save As...") } */
|
Controls.MenuItem { text: qsTr("Save") }
|
||||||
/* Controls.MenuSeparator { } */
|
Controls.MenuItem { text: qsTr("Save As...") }
|
||||||
/* Controls.MenuItem { text: qsTr("Quit") } */
|
Controls.MenuSeparator { }
|
||||||
/* } */
|
Controls.MenuItem { text: qsTr("Quit") }
|
||||||
/* Controls.Menu { */
|
}
|
||||||
/* title: qsTr("Settings") */
|
Controls.Menu {
|
||||||
/* Controls.MenuItem { */
|
title: qsTr("Settings")
|
||||||
/* text: qsTr("Configure") */
|
Controls.MenuItem {
|
||||||
/* onTriggered: openSettings() */
|
text: qsTr("Configure")
|
||||||
/* } */
|
onTriggered: openSettings()
|
||||||
/* } */
|
}
|
||||||
/* Controls.Menu { */
|
}
|
||||||
/* title: qsTr("Help") */
|
Controls.Menu {
|
||||||
/* Controls.MenuItem { text: qsTr("About") } */
|
title: qsTr("Help")
|
||||||
/* } */
|
Controls.MenuItem { text: qsTr("About") }
|
||||||
/* } : null */
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: menuLoader
|
||||||
|
active: Kirigami.Settings.hasPlatformMenuBar
|
||||||
|
sourceComponent: globalMenuComponent
|
||||||
|
onLoaded: print("Loaded global menu")
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: globalMenuComponent
|
||||||
Labs.MenuBar {
|
Labs.MenuBar {
|
||||||
|
id: globalMenu
|
||||||
Labs.Menu {
|
Labs.Menu {
|
||||||
title: qsTr("File")
|
title: qsTr("File")
|
||||||
Labs.MenuItem { text: qsTr("New...") }
|
Labs.MenuItem { text: qsTr("New...") }
|
||||||
|
@ -63,6 +74,7 @@ Kirigami.ApplicationWindow {
|
||||||
title: qsTr("Settings")
|
title: qsTr("Settings")
|
||||||
Labs.MenuItem {
|
Labs.MenuItem {
|
||||||
text: qsTr("Configure")
|
text: qsTr("Configure")
|
||||||
|
shortcut: "Ctrl+Shift+I"
|
||||||
onTriggered: openSettings()
|
onTriggered: openSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,6 +83,7 @@ Kirigami.ApplicationWindow {
|
||||||
Labs.MenuItem { text: qsTr("About") }
|
Labs.MenuItem { text: qsTr("About") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
width: 1800
|
width: 1800
|
||||||
height: 900
|
height: 900
|
||||||
|
@ -102,6 +115,7 @@ Kirigami.ApplicationWindow {
|
||||||
/* Kirigami.Settings.style = "Plasma"; */
|
/* Kirigami.Settings.style = "Plasma"; */
|
||||||
/* showPassiveNotification(Kirigami.Settings.style); */
|
/* showPassiveNotification(Kirigami.Settings.style); */
|
||||||
print("OS is: " + Qt.platform.os);
|
print("OS is: " + Qt.platform.os);
|
||||||
|
print("MENU " + Kirigami.Settings.hasPlatformMenuBar)
|
||||||
/* print("checking screens"); */
|
/* print("checking screens"); */
|
||||||
print("Present Mode is " + presenting);
|
print("Present Mode is " + presenting);
|
||||||
/* print(Qt.application.state); */
|
/* print(Qt.application.state); */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue