Setting slide changes on changing service item
This commit is contained in:
parent
3e646d8728
commit
4c84fdc614
9 changed files with 53 additions and 24 deletions
|
@ -13,9 +13,12 @@ Kirigami.ApplicationWindow {
|
|||
|
||||
property bool libraryOpen: true
|
||||
property bool presenting: false
|
||||
property bool presentMode: true
|
||||
property var screens
|
||||
|
||||
|
||||
property bool editMode: false
|
||||
|
||||
signal edit()
|
||||
|
||||
pageStack.initialPage: mainPage
|
||||
header: Presenter.Header {}
|
||||
width: 1800
|
||||
|
@ -25,6 +28,11 @@ Kirigami.ApplicationWindow {
|
|||
id: mainPage
|
||||
}
|
||||
|
||||
function toggleEditMode() {
|
||||
editMode = !editMode;
|
||||
mainPage.editSwitch(editMode);
|
||||
}
|
||||
|
||||
function toggleLibrary() {
|
||||
libraryOpen = !libraryOpen
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -13,7 +13,8 @@ Item {
|
|||
|
||||
Presenter.Slide {
|
||||
id: representation
|
||||
textSize: 48
|
||||
anchors.fill: parent
|
||||
textSize: width / 15
|
||||
editMode: true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ Item {
|
|||
}
|
||||
ColumnLayout {
|
||||
Controls.SplitView.fillHeight: true
|
||||
Controls.SplitView.preferredWidth: 500
|
||||
Controls.SplitView.preferredWidth: 700
|
||||
Controls.SplitView.minimumWidth: 300
|
||||
|
||||
Rectangle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue