diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000..a0a09dd
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,3 @@
+;; ((nil . ((projectile-project-run-cmd . "cmake -B buld/ . && make --dir build/ && ./build/bin/presenter")
+;; (compilation-read-command nil)
+;; (projectile-project-compilation-cmd . "cmake -B buld/ . && make --dir build/"))))
diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user
deleted file mode 100644
index 555980a..0000000
--- a/CMakeLists.txt.user
+++ /dev/null
@@ -1,191 +0,0 @@
-
-
-
-
-
- EnvironmentId
- {d6595ca1-5c4f-4487-b405-470a7201d856}
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 80
- true
- true
- 1
- false
- true
- false
- 0
- true
- true
- 0
- 8
- true
- false
- 1
- true
- true
- true
- *.md, *.MD, Makefile
- false
- true
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
- true
- false
- true
- true
- true
- true
-
-
- 0
- true
-
- true
- Builtin.BuildSystem
-
- true
- true
- Builtin.DefaultTidyAndClazy
- 4
-
-
-
- true
-
-
-
-
- ProjectExplorer.Project.Target.0
-
- Desktop
- Qt 5.15.2 in PATH (System)
- Qt 5.15.2 in PATH (System)
- {055b3c2c-94ff-418e-b088-9847da1e7c71}
- 0
- 0
- 0
-
- Debug
- -GUnix Makefiles
--DCMAKE_BUILD_TYPE:STRING=Debug
--DCMAKE_PROJECT_INCLUDE_BEFORE:PATH=%{IDE:ResourcePath}/package-manager/auto-setup.cmake
--DQT_QMAKE_EXECUTABLE:STRING=%{Qt:qmakeExecutable}
--DCMAKE_PREFIX_PATH:STRING=%{Qt:QT_INSTALL_PREFIX}
--DCMAKE_C_COMPILER:STRING=%{Compiler:Executable:C}
--DCMAKE_CXX_COMPILER:STRING=%{Compiler:Executable:Cxx}
- /home/chris/dev/church-presenter
- /home/chris/dev/church-presenter/build
-
-
-
- all
-
- true
- Build
- CMakeProjectManager.MakeStep
-
- 1
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
-
- clean
-
- true
- Build
- CMakeProjectManager.MakeStep
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Debug
- CMakeProjectManager.CMakeBuildConfiguration
-
- 1
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- true
- true
- true
-
- 2
-
- presenter
- CMakeProjectManager.CMakeRunConfiguration.presenter
- presenter
- false
- true
- true
- false
- true
- /home/chris/dev/church-presenter/build/bin
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 1
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 22
-
-
- Version
- 22
-
-
diff --git a/README.org b/README.org
index 6f8b6d1..8e62e20 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,7 @@
#+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.
+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 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 brackets)
- Presents songs lyrics with image and video backgrounds
diff --git a/build/CMakeCache.txt b/build/CMakeCache.txt
index 86c4944..11492b8 100644
--- a/build/CMakeCache.txt
+++ b/build/CMakeCache.txt
@@ -630,11 +630,11 @@ CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//Details about finding Gettext
FIND_PACKAGE_MESSAGE_DETAILS_Gettext:INTERNAL=[/usr/bin/msgmerge][/usr/bin/msgfmt][v0.21()]
//Details about finding KF5
-FIND_PACKAGE_MESSAGE_DETAILS_KF5:INTERNAL=[success][cfound components: Kirigami2 I18n CoreAddons ][v5.87.0(5.68.0)]
+FIND_PACKAGE_MESSAGE_DETAILS_KF5:INTERNAL=[success][cfound components: Kirigami2 I18n CoreAddons ][v5.90.0(5.68.0)]
//Details about finding KF5CoreAddons
FIND_PACKAGE_MESSAGE_DETAILS_KF5CoreAddons:INTERNAL=[/usr/lib64/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake][v5.90.0()]
//Details about finding KF5I18n
-FIND_PACKAGE_MESSAGE_DETAILS_KF5I18n:INTERNAL=[/usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake][v5.87.0()]
+FIND_PACKAGE_MESSAGE_DETAILS_KF5I18n:INTERNAL=[/usr/lib64/cmake/KF5I18n/KF5I18nConfig.cmake][v5.90.0()]
//Details about finding KF5Kirigami2
FIND_PACKAGE_MESSAGE_DETAILS_KF5Kirigami2:INTERNAL=[/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake][v5.90.0()]
//Test HAVE_DATE_TIME
diff --git a/build/CMakeFiles/Makefile.cmake b/build/CMakeFiles/Makefile.cmake
index 5d9e5ac..7ff2720 100644
--- a/build/CMakeFiles/Makefile.cmake
+++ b/build/CMakeFiles/Makefile.cmake
@@ -25,7 +25,7 @@ set(CMAKE_MAKEFILE_DEPENDS
"/usr/lib64/cmake/KF5I18n/KF5I18nConfigVersion.cmake"
"/usr/lib64/cmake/KF5I18n/KF5I18nMacros.cmake"
"/usr/lib64/cmake/KF5I18n/KF5I18nQchTargets.cmake"
- "/usr/lib64/cmake/KF5I18n/KF5I18nTargets-debug.cmake"
+ "/usr/lib64/cmake/KF5I18n/KF5I18nTargets-noconfig.cmake"
"/usr/lib64/cmake/KF5I18n/KF5I18nTargets.cmake"
"/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2Config.cmake"
"/usr/lib64/cmake/KF5Kirigami2/KF5Kirigami2ConfigVersion.cmake"
@@ -54,25 +54,35 @@ set(CMAKE_MAKEFILE_DEPENDS
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QEvdevTabletPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QEvdevTouchScreenPlugin.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_QICNSPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QICOPlugin.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_QLibInputPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QLinuxFbIntegrationPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.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_QPdfPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QSvgIconPlugin.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_QTuioTouchPlugin.cmake"
+ "/usr/lib64/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QVncIntegrationPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandEglPlatformIntegrationPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandIntegrationPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QWaylandXCompositeEglPlatformIntegrationPlugin.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_QXcbGlxIntegrationPlugin.cmake"
"/usr/lib64/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin.cmake"
@@ -117,6 +127,11 @@ set(CMAKE_MAKEFILE_DEPENDS
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfigExtras.cmake"
"/usr/lib64/cmake/Qt5Widgets/Qt5WidgetsConfigVersion.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/ECMConfigVersion.cmake"
"/usr/share/ECM/find-modules/ECMFindModuleHelpersStub.cmake"
diff --git a/src/qml/main.qml b/src/qml/main.qml
index 3d01f12..78a7b36 100644
--- a/src/qml/main.qml
+++ b/src/qml/main.qml
@@ -28,6 +28,10 @@ Kirigami.ApplicationWindow {
libraryOpen = !libraryOpen
}
- Component.onCompleted: secondScreen = Qt.application.screens[1]
+ Component.onCompleted: {
+ print("checking screens")
+ secondScreen = Qt.application.screens[1]
+ print(secondScreen)
+ }
}
diff --git a/src/qml/presenter/Library.qml b/src/qml/presenter/Library.qml
index e0cd223..db13b0e 100644
--- a/src/qml/presenter/Library.qml
+++ b/src/qml/presenter/Library.qml
@@ -8,207 +8,353 @@ import "./" as Presenter
Item {
id: root
- /* ColumnLayout { */
- /* anchors.fill: parent */
- /* spacing: 0 */
- /* Rectangle { */
- /* id: songLibraryPanel */
- /* Layout.preferredHeight: 40 */
- /* Layout.fillWidth: true */
- /* color: Kirigami.Theme.backgroundColor */
+ property string selectedLibrary: "songs"
- /* Controls.Label { */
- /* anchors.centerIn: parent */
- /* text: "Songs" */
- /* } */
+ Kirigami.Theme.colorSet: Kirigami.Theme.View
- /* MouseArea { */
- /* anchors.fill: parent */
- /* onClicked: { */
- /* if (songLibraryList.state == "selected") */
- /* songLibraryList.state = "deselected" */
- /* else */
- /* songLibraryList.state = "selected" */
- /* } */
- /* } */
- /* } */
+ ColumnLayout {
+ anchors.fill: parent
+ spacing: 0
+ Rectangle {
+ id: songLibraryPanel
+ Layout.preferredHeight: 40
+ Layout.fillWidth: true
+ color: Kirigami.Theme.backgroundColor
- /* ListView { */
- /* Layout.fillHeight: true */
- /* Layout.fillWidth: true */
- /* id: songLibraryList */
- /* model: _songListModel */
- /* delegate: itemDelegate */
+ Controls.Label {
+ anchors.centerIn: parent
+ text: "Songs"
+ }
- /* Component.onCompleted: songLibraryList.state = selected */
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (selectedLibrary == "songs")
+ selectedLibrary = ""
+ else
+ selectedLibrary = "songs"
+ print(selectedLibrary)
+ }
+ }
+ }
- /* states: [ */
- /* State { */
- /* name: "deselected" */
- /* PropertyChanges { target: songLibraryList */
- /* height: 0 */
- /* Layout.fillHeight: false */
- /* visible: false */
- /* } */
- /* }, */
- /* State { */
- /* name: "selected" */
- /* PropertyChanges { target: songLibraryList } */
- /* } */
- /* ] */
+ ListView {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ id: songLibraryList
+ model: _songListModel
+ delegate: itemDelegate
+ state: "selected"
- /* transitions: Transition { */
- /* from: "selected" */
- /* to: "deselected" */
- /* NumberAnimation { */
- /* target: songLibraryList */
- /* properties: "height" */
- /* easing.type: Easing.OutCubic */
- /* duration: 300 */
- /* } */
- /* } */
+ Component.onCompleted: print(selectedLibrary)
- /* Component { */
- /* id: itemDelegate */
- /* Kirigami.BasicListItem { */
- /* width: ListView.view.width */
- /* height:40 */
- /* label: title */
- /* subtitle: author */
- /* hoverEnabled: true */
- /* onClicked: { */
- /* ListView.view.currentIndex = index */
- /* songTitle = title */
- /* songLyrics = lyrics */
- /* songAuthor = author */
- /* showPassiveNotification(songLyrics, 3000) */
- /* } */
- /* } */
- /* } */
+ states: [
+ State {
+ name: "deselected"
+ when: (selectedLibrary !== "songs")
+ PropertyChanges { target: songLibraryList
+ height: 0
+ Layout.fillHeight: false
+ visible: false
+ }
+ },
+ State {
+ name: "selected"
+ when: (selectedLibrary == "songs")
+ PropertyChanges { target: songLibraryList }
+ }
+ ]
- /* Kirigami.WheelHandler { */
- /* id: wheelHandler */
- /* target: songLibraryList */
- /* filterMouseEvents: true */
- /* keyNavigationEnabled: true */
- /* } */
+ transitions: Transition {
+ to: "*"
+ NumberAnimation {
+ target: songLibraryList
+ properties: "height"
+ easing.type: Easing.OutCubic
+ duration: 300
+ }
+ }
- /* Controls.ScrollBar.vertical: Controls.ScrollBar { */
- /* anchors.right: songLibraryList.right */
- /* anchors.leftMargin: 10 */
- /* active: hovered || pressed */
- /* } */
- /* } */
+ Component {
+ id: itemDelegate
+ Kirigami.BasicListItem {
+ width: ListView.view.width
+ height:40
+ label: title
+ subtitle: author
+ hoverEnabled: true
+ onClicked: {
+ ListView.view.currentIndex = index
+ songTitle = title
+ songLyrics = lyrics
+ songAuthor = author
+ showPassiveNotification(songLyrics, 3000)
+ }
+ }
+ }
- /* Rectangle { */
- /* id: videoLibraryPanel */
- /* Layout.preferredHeight: 40 */
- /* Layout.fillWidth: true */
- /* color: Kirigami.Theme.backgroundColor */
- /* opacity: 1.0 */
+ Kirigami.WheelHandler {
+ id: wheelHandler
+ target: songLibraryList
+ filterMouseEvents: true
+ keyNavigationEnabled: true
+ }
- /* Controls.Label { */
- /* anchors.centerIn: parent */
- /* text: "Videos" */
- /* } */
+ Controls.ScrollBar.vertical: Controls.ScrollBar {
+ anchors.right: songLibraryList.right
+ anchors.leftMargin: 10
+ active: hovered || pressed
+ }
+ }
- /* MouseArea { */
- /* anchors.fill: parent */
- /* } */
- /* } */
+ Rectangle {
+ id: videoLibraryPanel
+ Layout.preferredHeight: 40
+ Layout.fillWidth: true
+ color: Kirigami.Theme.backgroundColor
- /* ListView { */
- /* id: videoLibraryList */
- /* Layout.fillHeight: true */
- /* Layout.fillWidth: true */
+ Controls.Label {
+ anchors.centerIn: parent
+ text: "Videos"
+ }
- /* } */
- /* Rectangle { */
- /* id: imageLibraryPanel */
- /* Layout.preferredHeight: 40 */
- /* Layout.fillWidth: true */
- /* color: Kirigami.Theme.backgroundColor */
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (selectedLibrary == "videos")
+ selectedLibrary = ""
+ else
+ selectedLibrary = "videos"
+ print(selectedLibrary)
+ }
+ }
+ }
- /* Controls.Label { */
- /* anchors.centerIn: parent */
- /* text: "Images" */
- /* } */
+ ListView {
+ id: videoLibraryList
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ state: "deselected"
- /* MouseArea { */
- /* anchors.fill: parent */
- /* } */
- /* } */
+ states: [
+ State {
+ name: "deselected"
+ when: (selectedLibrary !== "videos")
+ PropertyChanges { target: videoLibraryList
+ height: 0
+ Layout.fillHeight: false
+ visible: false
+ }
+ },
+ State {
+ name: "selected"
+ when: (selectedLibrary == "videos")
+ PropertyChanges { target: videoLibraryList }
+ }
+ ]
- /* ListView { */
- /* id: imageLibraryList */
- /* Layout.fillHeight: true */
- /* Layout.fillWidth: true */
+ transitions: Transition {
+ to: "*"
+ NumberAnimation {
+ target: videoLibraryList
+ properties: "height"
+ easing.type: Easing.OutCubic
+ duration: 300
+ }
+ }
+ }
- /* } */
- /* Rectangle { */
- /* id: presentationLibraryPanel */
- /* Layout.preferredHeight: 40 */
- /* Layout.fillWidth: true */
- /* color: Kirigami.Theme.backgroundColor */
+ Rectangle {
+ id: imageLibraryPanel
+ Layout.preferredHeight: 40
+ Layout.fillWidth: true
+ color: Kirigami.Theme.backgroundColor
- /* Controls.Label { */
- /* anchors.centerIn: parent */
- /* text: "Presentations" */
- /* } */
+ Controls.Label {
+ anchors.centerIn: parent
+ text: "Images"
+ }
- /* MouseArea { */
- /* anchors.fill: parent */
- /* } */
- /* } */
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (selectedLibrary == "images")
+ selectedLibrary = ""
+ else
+ selectedLibrary = "images"
+ print(selectedLibrary)
+ }
+ }
+ }
- /* ListView { */
- /* id: presentationLibraryList */
- /* Layout.fillHeight: true */
- /* Layout.fillWidth: true */
+ ListView {
+ id: imageLibraryList
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ state: "deselected"
- /* } */
- /* Rectangle { */
- /* id: slideLibraryPanel */
- /* Layout.preferredHeight: 40 */
- /* Layout.fillWidth: true */
- /* color: Kirigami.Theme.backgroundColor */
+ states: [
+ State {
+ name: "deselected"
+ when: (selectedLibrary !== "images")
+ PropertyChanges { target: imageLibraryList
+ height: 0
+ Layout.fillHeight: false
+ visible: false
+ }
+ },
+ State {
+ name: "selected"
+ when: (selectedLibrary == "images")
+ PropertyChanges { target: imageLibraryList }
+ }
+ ]
- /* Controls.Label { */
- /* anchors.centerIn: parent */
- /* text: "Slides" */
- /* } */
+ transitions: Transition {
+ to: "*"
+ NumberAnimation {
+ target: imageLibraryList
+ properties: "height"
+ easing.type: Easing.OutCubic
+ duration: 300
+ }
+ }
- /* MouseArea { */
- /* anchors.fill: parent */
- /* } */
- /* } */
+ }
+ Rectangle {
+ id: presentationLibraryPanel
+ Layout.preferredHeight: 40
+ Layout.fillWidth: true
+ color: Kirigami.Theme.backgroundColor
- /* ListView { */
- /* id: slideLibraryList */
- /* Layout.fillHeight: true */
- /* Layout.fillWidth: true */
+ Controls.Label {
+ anchors.centerIn: parent
+ text: "Presentations"
+ }
- /* } */
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (selectedLibrary == "presentations")
+ selectedLibrary = ""
+ else
+ selectedLibrary = "presentations"
+ print(selectedLibrary)
+ }
+ }
+ }
+
+ ListView {
+ id: presentationLibraryList
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ state: "deselected"
+
+ states: [
+ State {
+ name: "deselected"
+ when: (selectedLibrary !== "presentations")
+ PropertyChanges { target: presentationLibraryList
+ height: 0
+ Layout.fillHeight: false
+ visible: false
+ }
+ },
+ State {
+ name: "selected"
+ when: (selectedLibrary == "presentations")
+ PropertyChanges { target: presentationLibraryList }
+ }
+ ]
+
+ transitions: Transition {
+ to: "*"
+ NumberAnimation {
+ target: presentationLibraryList
+ properties: "height"
+ easing.type: Easing.OutCubic
+ duration: 300
+ }
+ }
+
+ }
+ Rectangle {
+ id: slideLibraryPanel
+ Layout.preferredHeight: 40
+ Layout.fillWidth: true
+ color: Kirigami.Theme.backgroundColor
+
+ Controls.Label {
+ anchors.centerIn: parent
+ text: "Slides"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (selectedLibrary == "slides")
+ selectedLibrary = ""
+ else
+ selectedLibrary = "slides"
+ print(selectedLibrary)
+ }
+ }
+ }
+
+ ListView {
+ id: slideLibraryList
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ state: "deselected"
+
+ states: [
+ State {
+ name: "deselected"
+ when: (selectedLibrary !== "slides")
+ PropertyChanges { target: slideLibraryList
+ height: 0
+ Layout.fillHeight: false
+ visible: false
+ }
+ },
+ State {
+ name: "selected"
+ when: (selectedLibrary == "slides")
+ PropertyChanges { target: slideLibraryList }
+ }
+ ]
+
+ transitions: Transition {
+ to: "*"
+ NumberAnimation {
+ target: slideLibraryList
+ properties: "height"
+ easing.type: Easing.OutCubic
+ duration: 300
+ }
+ }
+
+ }
+ }
+
+ /* Presenter.LibraryItem { */
+ /* id: songLibrary */
+ /* title: "Songs" */
+ /* model: _songListModel */
+ /* open: true */
+ /* /\* type: "song" *\/ */
+ /* width: parent.width */
+ /* anchors.top: parent.top */
/* } */
- Presenter.LibraryItem {
- id: songLibrary
- title: "Songs"
- model: _songListModel
- open: true
- /* type: "song" */
- /* Layout.fillHeight: true */
- Layout.fillWidth: true
- /* Layout.preferredHeight: parent.height */
- }
-
- Presenter.LibraryItem {
- id: ssongLibrary
- title: "Songs"
- model: _songListModel
- open: false
- /* type: "song" */
- }
-
+ /* Presenter.LibraryItem { */
+ /* id: ssongLibrary */
+ /* title: "Songs" */
+ /* model: _songListModel */
+ /* open: false */
+ /* width: parent.width */
+ /* /\* type: "song" *\/ */
+ /* anchors.top: songLibrary.bottom */
+ /* } */
}
diff --git a/src/qml/presenter/LibraryItem.qml b/src/qml/presenter/LibraryItem.qml
index f87f574..89c00bc 100644
--- a/src/qml/presenter/LibraryItem.qml
+++ b/src/qml/presenter/LibraryItem.qml
@@ -1,4 +1,3 @@
-
import QtQuick 2.13
import QtQuick.Dialogs 1.0
import QtQuick.Controls 2.0 as Controls
diff --git a/src/qml/presenter/MainWindow.qml b/src/qml/presenter/MainWindow.qml
index 9e96966..3ea2476 100644
--- a/src/qml/presenter/MainWindow.qml
+++ b/src/qml/presenter/MainWindow.qml
@@ -11,8 +11,7 @@ import "./" as Presenter
Controls.Page {
id: mainPage
padding: 0
- property url videoBackground: ""
- property url imageBackground: ""
+ property url background: ""
property string songTitle: ""
property string songLyrics: ""
property string songAuthor: ""
@@ -93,10 +92,13 @@ Controls.Page {
nameFilters: ["Video files (*.mp4 *.mkv *.mov *.wmv *.avi *.MP4 *.MOV *.MKV)",
"Image files (*.jpg *.jpeg *.png *.JPG *.JPEG *.PNG)"]
onAccepted: {
- print("You chose: " + fileDialog.fileUrls)
- background = fileDialog.fileUrls
+ print("You chose: " + fileDialog.fileUrls);
+ videoBackground = fileDialog.fileUrl;
+ print(videoBackground);
-
+ str = videoBackground.toString();
+ if (str.endsWith("mp4"))
+ videoBackground = fileDialog.fileUrl; print("WE DID IT!!");
}
onRejected: {
@@ -106,4 +108,8 @@ Controls.Page {
}
+ function endsWith(str, suffix) {
+ return str.indexOf(suffix, str.length - suffix.length) !== -1;
+ }
+
}
diff --git a/src/qml/presenter/SlideEditor.qml b/src/qml/presenter/SlideEditor.qml
new file mode 100644
index 0000000..7561eeb
--- /dev/null
+++ b/src/qml/presenter/SlideEditor.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.13
+import QtQuick.Dialogs 1.0
+import QtQuick.Controls 2.15 as Controls
+import QtQuick.Window 2.13
+import QtQuick.Layouts 1.2
+import QtMultimedia 5.15
+import QtAudioEngine 1.15
+import org.kde.kirigami 2.13 as Kirigami
+import "./" as Presenter
+
+Item {
+ id: root
+
+ Presenter.Slide {
+ id: representation
+
+ }
+}
diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml
index 926799f..5a82f87 100644
--- a/src/qml/presenter/SongEditor.qml
+++ b/src/qml/presenter/SongEditor.qml
@@ -106,14 +106,13 @@ Item {
text: songLyrics
textFormat: TextEdit.MarkdownText
padding: 10
- onEditingFinished: showPassiveNotification("updated...", 2000)
+ onEditingFinished: editorTimer.running = false
onPressed: editorTimer.running = true
}
}
- Rectangle {
+ Presenter.SlideEditor {
id: slideEditor
- color: "red"
Layout.preferredHeight: 800
Layout.fillWidth: true
Layout.fillHeight: true
@@ -138,7 +137,7 @@ Item {
Timer {
id: editorTimer
- interval: 1000
+ interval: 2000
repeat: true
running: false
onTriggered: showPassiveNotification("updating song...")
diff --git a/src/resources.qrc b/src/resources.qrc
index f645575..c26e9e9 100644
--- a/src/resources.qrc
+++ b/src/resources.qrc
@@ -13,6 +13,7 @@
qml/presenter/PanelItem.qml
qml/presenter/SongEditor.qml
qml/presenter/Slide.qml
+ qml/presenter/SlideEditor.qml
assets/parallel.jpg