Setting slide changes on changing service item

This commit is contained in:
Chris Cochrun 2022-03-04 16:50:01 -06:00
parent 3e646d8728
commit 4c84fdc614
9 changed files with 53 additions and 24 deletions

View file

@ -30,9 +30,9 @@ Kirigami.ActionToolBar {
},
Kirigami.Action {
icon.name: "edit"
text: presentMode ? "Edit" : "Preview"
onTriggered: presentMode = !presentMode
icon.name: editMode ? "view-preview" : "edit"
text: editMode ? "Preview" : "Edit"
onTriggered: toggleEditMode()
},
Kirigami.Action {

View file

@ -107,6 +107,7 @@ ColumnLayout {
onClicked: {
serviceItemList.currentIndex = index;
showPassiveNotification(serviceItemList.currentIndex);
changeSlideText(text);
}
}
@ -140,10 +141,12 @@ ColumnLayout {
ListElement {
name: "10,000 Reason"
type: "song"
text: "YIP YIP!"
}
ListElement {
name: "Marvelous Light"
type: "song"
text: "YIP YIP!"
}
ListElement {
name: "10,000 Reason"

View file

@ -31,7 +31,7 @@ Controls.Page {
signal songLyricsUpdated(string lyrics)
Component.onCompleted: {
mainPage.songLyricsUpdated.connect(library.updateSongLyrics)
mainPage.songLyricsUpdated.connect(library.updateSongLyrics);
}
Item {
@ -64,8 +64,7 @@ Controls.Page {
Controls.SplitView.fillWidth: true
Controls.SplitView.preferredWidth: 700
Controls.SplitView.minimumWidth: 500
initialItem: presenterComp
initialItem: Presenter.Presentation { id: presentation }
}
Presenter.Library {
@ -85,14 +84,6 @@ Controls.Page {
}
}
Component {
id: presenterComp
Presenter.Presentation {
id: presentation
}
}
Loader {
id: presentLoader
active: presenting
@ -106,13 +97,15 @@ Controls.Page {
Component.onCompleted: {
presentationWindow.showFullScreen();
print(Qt.application.screens[1])
print(screens[1].name)
}
Presenter.Slide {
id: presentationSlide
anchors.fill: parent
imageSource: imageBackground
videoSource: videoBackground
text: "good"
Component.onCompleted: slideItem = presentationSlide
}
@ -158,6 +151,21 @@ Controls.Page {
id: songsqlmodel
}
function changeSlideText(text) {
showPassiveNotification("used to be: " + presentation.text);
presentation.text = text;
showPassiveNotification("next");
presentationSlide.text = text;
showPassiveNotification("last");
}
function editSwitch(edit) {
if (edit)
mainPageArea.push(songEditorComp, Controls.StackView.Immediate)
else
mainPageArea.pop(Controls.StackView.Immediate)
}
function updateLyrics(lyrics) {
songsqlmodel.updateLyrics(song, lyrics);
}

View file

@ -10,6 +10,8 @@ import "./" as Presenter
Item {
id: root
property string text: "GOOD"
GridLayout {
anchors.fill: parent
columns: 3
@ -61,9 +63,11 @@ Item {
}
Presenter.Slide {
Layout.preferredWidth: 700
Layout.preferredHeight: 500
Layout.preferredWidth: 900
Layout.preferredHeight: width / 16 * 9
Layout.alignment: Qt.AlignCenter
textSize: width / 15
text: root.text
}
Kirigami.Icon {

View file

@ -20,6 +20,7 @@ Item {
property url imageSource: imageBackground
property url videoSource: videoBackground
property string chosenFont: "Quicksand"
property string text: "This is demo text"
property color backgroundColor
// These properties help to determine the state of the slide
@ -82,9 +83,9 @@ Item {
Controls.Label {
id: lyrics
text: "This is some test lyrics" // change to song lyrics of current verse
font.pointSize: textSize
minimumPointSize: 5
text: root.text
font.pixelSize: textSize
/* minimumPointSize: 5 */
fontSizeMode: Text.Fit
font.family: chosenFont
style: Text.Raised

View file

@ -13,7 +13,8 @@ Item {
Presenter.Slide {
id: representation
textSize: 48
anchors.fill: parent
textSize: width / 15
editMode: true
}
}

View file

@ -185,7 +185,7 @@ Item {
}
ColumnLayout {
Controls.SplitView.fillHeight: true
Controls.SplitView.preferredWidth: 500
Controls.SplitView.preferredWidth: 700
Controls.SplitView.minimumWidth: 300
Rectangle {