Screens work and the beginnings of a settings module

This commit is contained in:
Chris Cochrun 2022-03-11 17:00:19 -06:00
parent 9882a0a289
commit fab9f86b41
6 changed files with 67 additions and 32 deletions

View file

@ -39,8 +39,8 @@ Kirigami.ActionToolBar {
icon.name: "view-presentation"
text: presenting ? "Presenting" : "Go Live"
onTriggered: {
print("Window is loading")
presenting = true
print("Window is loading");
togglePresenting();
}
},

View file

@ -161,8 +161,11 @@ ColumnLayout {
background: "file:/home/chris/nextcloud/tfc/openlp/videos/test.mp4"
}
ListElement {
name: "Marvelous Light"
type: "song"
name: "facebook"
type: "video"
text: ""
backgroundType: "video"
background: "file:/home/chris/nextcloud/tfc/videos/facebook-ukraine-vid.mkv"
}
ListElement {
name: "10,000 Reason"

View file

@ -28,12 +28,6 @@ Controls.Page {
property var song
property var draggedLibraryItem
signal songLyricsUpdated(string lyrics)
Component.onCompleted: {
mainPage.songLyricsUpdated.connect(library.updateSongLyrics);
}
Item {
id: mainItem
anchors.fill: parent
@ -97,12 +91,13 @@ Controls.Page {
title: "presentation-window"
height: maximumHeight
width: maximumWidth
screen: screens[0]
screen: presentationScreen
flags: Qt.X11BypassWindowManagerHint
onClosing: presenting = false
Component.onCompleted: {
presentationWindow.showFullScreen();
print(screens[1].name)
print(screen.name);
}
Presenter.Slide {
@ -110,14 +105,14 @@ Controls.Page {
anchors.fill: parent
imageSource: imageBackground
videoSource: videoBackground
text: "good"
text: ""
Component.onCompleted: slideItem = presentationSlide
}
}
}
FileDialog {
id: videoFileDialog
title: "Please choose a background"
@ -205,6 +200,13 @@ Controls.Page {
mainPageArea.pop(Controls.StackView.Immediate)
}
function present(present) {
if (present)
presentationWindow.showFullScreen();
else
presentationWindow.close();
}
function updateLyrics(lyrics) {
songsqlmodel.updateLyrics(song, lyrics);
}

View file

@ -8,19 +8,26 @@ import org.presenter 1.0
Kirigami.OverlaySheet {
property ListModel model
property ListModel theModel
id: root
header: Kirigami.Heading {
text: "Settings"
}
/* Component.onCompleted: { */
/* showPassiveNotification(screenModel.get(1).name) */
/* } */
Kirigami.FormLayout {
Controls.ComboBox {
id: screenSelectionField
Kirigami.FormData.label: i18nc("@label:textbox", "Screen:")
model: model
textRole: name
onAccepted: descriptionField.forceActiveFocus()
Kirigami.FormData.label: i18nc("@label:textbox", "Presentation Screen:")
model: screens
textRole: "name"
onActivated: {
presentationScreen = screens[currentIndex];
}
}
Controls.TextField {
id: descriptionField