Added readme and cleaned up some ui pieces
This commit is contained in:
parent
6e9e1eca0d
commit
42e772591c
9 changed files with 74 additions and 53 deletions
29
README.org
Normal file
29
README.org
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#+TITLE: Church Presenter
|
||||||
|
#+AUTHOR: Chris Cochrun
|
||||||
|
|
||||||
|
* Church Presenter
|
||||||
|
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 created a web server and rendering a page 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 brackets)
|
||||||
|
- Presents songs lyrics with image and video backgrounds
|
||||||
|
- Presents slides
|
||||||
|
- (Custom slide builder)
|
||||||
|
- (Simple song creation with a powerful text parser)
|
||||||
|
|
||||||
|
* Build and Run
|
||||||
|
First get the source code
|
||||||
|
|
||||||
|
Then into the root directory.
|
||||||
|
#+BEGIN_SRC
|
||||||
|
cd church-presenter
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Then build.
|
||||||
|
#+BEGIN_SRC
|
||||||
|
cmake -B build/ . && cmake --build build/
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Then run.
|
||||||
|
#+BEGIN_SRC
|
||||||
|
./build/bin/presenter
|
||||||
|
#+END_SRC
|
|
@ -615,11 +615,11 @@ CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||||
//Details about finding Gettext
|
//Details about finding Gettext
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_Gettext:INTERNAL=[/usr/bin/msgmerge][/usr/bin/msgfmt][v0.21()]
|
FIND_PACKAGE_MESSAGE_DETAILS_Gettext:INTERNAL=[/usr/bin/msgmerge][/usr/bin/msgfmt][v0.21()]
|
||||||
//Details about finding KF5
|
//Details about finding KF5
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_KF5:INTERNAL=[success][cfound components: Kirigami2 I18n CoreAddons ][v5.90.0(5.68.0)]
|
FIND_PACKAGE_MESSAGE_DETAILS_KF5:INTERNAL=[success][cfound components: Kirigami2 I18n CoreAddons ][v5.87.0(5.68.0)]
|
||||||
//Details about finding KF5CoreAddons
|
//Details about finding KF5CoreAddons
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_KF5CoreAddons:INTERNAL=[/usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake][v5.90.0()]
|
FIND_PACKAGE_MESSAGE_DETAILS_KF5CoreAddons:INTERNAL=[/usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake][v5.90.0()]
|
||||||
//Details about finding KF5I18n
|
//Details about finding KF5I18n
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_KF5I18n:INTERNAL=[/usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake][v5.90.0()]
|
FIND_PACKAGE_MESSAGE_DETAILS_KF5I18n:INTERNAL=[/usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake][v5.87.0()]
|
||||||
//Details about finding KF5Kirigami2
|
//Details about finding KF5Kirigami2
|
||||||
FIND_PACKAGE_MESSAGE_DETAILS_KF5Kirigami2:INTERNAL=[/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake][v5.90.0()]
|
FIND_PACKAGE_MESSAGE_DETAILS_KF5Kirigami2:INTERNAL=[/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake][v5.90.0()]
|
||||||
//Test HAVE_DATE_TIME
|
//Test HAVE_DATE_TIME
|
||||||
|
|
|
@ -25,7 +25,7 @@ set(CMAKE_MAKEFILE_DEPENDS
|
||||||
"/usr/lib64/cmake/KF5I18n/KF5I18nConfigVersion.cmake"
|
"/usr/lib64/cmake/KF5I18n/KF5I18nConfigVersion.cmake"
|
||||||
"/usr/lib64/cmake/KF5I18n/KF5I18nMacros.cmake"
|
"/usr/lib64/cmake/KF5I18n/KF5I18nMacros.cmake"
|
||||||
"/usr/lib64/cmake/KF5I18n/KF5I18nQchTargets.cmake"
|
"/usr/lib64/cmake/KF5I18n/KF5I18nQchTargets.cmake"
|
||||||
"/usr/lib64/cmake/KF5I18n/KF5I18nTargets-noconfig.cmake"
|
"/usr/lib64/cmake/KF5I18n/KF5I18nTargets-debug.cmake"
|
||||||
"/usr/lib64/cmake/KF5I18n/KF5I18nTargets.cmake"
|
"/usr/lib64/cmake/KF5I18n/KF5I18nTargets.cmake"
|
||||||
"/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake"
|
"/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake"
|
||||||
"/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2ConfigVersion.cmake"
|
"/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2ConfigVersion.cmake"
|
||||||
|
@ -54,35 +54,25 @@ set(CMAKE_MAKEFILE_DEPENDS
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QEvdevTabletPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QEvdevTabletPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QEvdevTouchScreenPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QEvdevTouchScreenPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QGtk2ThemePlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QGtk3ThemePlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QGtk3ThemePlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QICNSPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QIbusPlatformInputContextPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QIbusPlatformInputContextPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QJp2Plugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QLibInputPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QLibInputPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QLinuxFbIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QLinuxFbIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QMngPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QPdfPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QPdfPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QSvgIconPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QSvgIconPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QSvgPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QSvgPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QTgaPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QTiffPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QTsLibPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QTsLibPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QTuioTouchPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QVncIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QVncIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandEglPlatformIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandEglPlatformIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandXCompositeEglPlatformIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandXCompositeEglPlatformIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandXCompositeGlxPlatformIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandXCompositeGlxPlatformIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWbmpPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWebGLIntegrationPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWebpPlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbEglIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbEglIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbGlxIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbGlxIntegrationPlugin.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin.cmake"
|
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin.cmake"
|
||||||
|
@ -119,11 +109,6 @@ set(CMAKE_MAKEFILE_DEPENDS
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake"
|
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfigVersion.cmake"
|
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfigVersion.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake"
|
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake"
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5Widgets_QBB10StylePlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5Widgets_QCleanlooksStylePlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5Widgets_QGtk2StylePlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5Widgets_QMotifStylePlugin.cmake"
|
|
||||||
"/usr/lib64/cmake/Qt5Widgets/Qt5Widgets_QPlastiqueStylePlugin.cmake"
|
|
||||||
"/usr/share/ECM/cmake/ECMConfig.cmake"
|
"/usr/share/ECM/cmake/ECMConfig.cmake"
|
||||||
"/usr/share/ECM/cmake/ECMConfigVersion.cmake"
|
"/usr/share/ECM/cmake/ECMConfigVersion.cmake"
|
||||||
"/usr/share/ECM/find-modules/ECMFindModuleHelpersStub.cmake"
|
"/usr/share/ECM/find-modules/ECMFindModuleHelpersStub.cmake"
|
||||||
|
|
|
@ -25,4 +25,5 @@ Kirigami.ApplicationWindow {
|
||||||
function toggleLibrary() {
|
function toggleLibrary() {
|
||||||
libraryOpen = !libraryOpen
|
libraryOpen = !libraryOpen
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,19 +22,13 @@ Kirigami.ActionToolBar {
|
||||||
displayComponent: Component {
|
displayComponent: Component {
|
||||||
Kirigami.SearchField {
|
Kirigami.SearchField {
|
||||||
id: searchField
|
id: searchField
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: parent.width / 3
|
||||||
onAccepted: showPassiveNotification(searchField.text, 3000)
|
onAccepted: showPassiveNotification(searchField.text, 3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
Kirigami.Action {
|
|
||||||
icon.name: "fileopen"
|
|
||||||
text: "VideoBG"
|
|
||||||
onTriggered: {
|
|
||||||
print("Action button in buttons page clicked");
|
|
||||||
fileDialog.open()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
icon.name: "view-presentation"
|
icon.name: "view-presentation"
|
||||||
text: "Go Live"
|
text: "Go Live"
|
||||||
|
|
|
@ -25,8 +25,12 @@ Item {
|
||||||
label: title
|
label: title
|
||||||
subtitle: author
|
subtitle: author
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: ListView.view.currentIndex = index
|
onClicked: {
|
||||||
|
ListView.view.currentIndex = index
|
||||||
|
songTitle = title
|
||||||
|
songLyrics = lyrics
|
||||||
|
showPassiveNotification(songLyrics, 3000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,10 @@ import "./" as Presenter
|
||||||
Controls.Page {
|
Controls.Page {
|
||||||
id: mainPage
|
id: mainPage
|
||||||
padding: 0
|
padding: 0
|
||||||
property var video: null
|
property url videoBackground: ""
|
||||||
|
property url imageBackground: ""
|
||||||
|
property string songTitle: ""
|
||||||
|
property string songLyrics: ""
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
|
@ -57,23 +60,6 @@ Controls.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FileDialog {
|
|
||||||
id: fileDialog
|
|
||||||
title: "Please choose a video"
|
|
||||||
folder: shortcuts.home
|
|
||||||
selectMultiple: false
|
|
||||||
onAccepted: {
|
|
||||||
print("You chose: " + fileDialog.fileUrls)
|
|
||||||
video = fileDialog.fileUrl
|
|
||||||
}
|
|
||||||
onRejected: {
|
|
||||||
print("Canceled")
|
|
||||||
/* Qt.quit() */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: presentLoader
|
id: presentLoader
|
||||||
active: presenting
|
active: presenting
|
||||||
|
@ -93,4 +79,22 @@ Controls.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileDialog {
|
||||||
|
id: fileDialog
|
||||||
|
title: "Please choose a video"
|
||||||
|
folder: shortcuts.home
|
||||||
|
selectMultiple: false
|
||||||
|
onAccepted: {
|
||||||
|
print("You chose: " + fileDialog.fileUrls)
|
||||||
|
background = fileDialog.fileUrls
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
onRejected: {
|
||||||
|
print("Canceled")
|
||||||
|
/* Qt.quit() */
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,11 @@ Item {
|
||||||
}
|
}
|
||||||
Controls.ToolButton {
|
Controls.ToolButton {
|
||||||
text: "Background"
|
text: "Background"
|
||||||
|
icon.name: "fileopen"
|
||||||
|
onClicked: {
|
||||||
|
print("Action button in buttons page clicked");
|
||||||
|
fileDialog.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,6 +62,8 @@ Item {
|
||||||
Controls.TextField {
|
Controls.TextField {
|
||||||
implicitWidth: 300
|
implicitWidth: 300
|
||||||
Layout.leftMargin: 20
|
Layout.leftMargin: 20
|
||||||
|
placeholderText: "Song Title..."
|
||||||
|
text: songTitle
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -72,6 +79,9 @@ Item {
|
||||||
Layout.bottomMargin: 30
|
Layout.bottomMargin: 30
|
||||||
Layout.leftMargin: 20
|
Layout.leftMargin: 20
|
||||||
placeholderText: "Put lyrics here..."
|
placeholderText: "Put lyrics here..."
|
||||||
|
persistentSelection: true
|
||||||
|
text: songLyrics
|
||||||
|
textFormat: TextEdit.MarkdownText
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -82,5 +92,4 @@ Item {
|
||||||
Layout.rightMargin: 20
|
Layout.rightMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,9 @@ SongListModel::SongListModel(QObject *parent)
|
||||||
|
|
||||||
int SongListModel::rowCount(const QModelIndex &parent) const
|
int SongListModel::rowCount(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
// For list models only the root node (an invalid parent) should return the list's size. For all
|
|
||||||
// other (valid) parents, rowCount() should return 0 so that it does not become a tree model.
|
|
||||||
if (parent.isValid())
|
if (parent.isValid())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// FIXME: Implement me!
|
|
||||||
return m_data.count();
|
return m_data.count();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant SongListModel::data(const QModelIndex &index, int role) const
|
QVariant SongListModel::data(const QModelIndex &index, int role) const
|
||||||
|
@ -25,7 +20,7 @@ QVariant SongListModel::data(const QModelIndex &index, int role) const
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
// FIXME: Implement me!
|
// this is the returning of song data
|
||||||
const Data &data = m_data.at(index.row());
|
const Data &data = m_data.at(index.row());
|
||||||
if ( role == TitleRole )
|
if ( role == TitleRole )
|
||||||
return data.title;
|
return data.title;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue