simplifying qml response to changes in songs
This commit is contained in:
parent
90c12e2fda
commit
85b9f9cede
1 changed files with 22 additions and 22 deletions
|
@ -345,10 +345,10 @@ Item {
|
||||||
textFormat: TextEdit.PlainText
|
textFormat: TextEdit.PlainText
|
||||||
padding: 10
|
padding: 10
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
updateLyrics(text);
|
songEditorModel.lyrics = text
|
||||||
editorTimer.running = false;
|
/* editorTimer.running = false; */
|
||||||
}
|
}
|
||||||
onPressed: editorTimer.running = true
|
/* onPressed: editorTimer.running = true */
|
||||||
background: Presenter.TextBackground {
|
background: Presenter.TextBackground {
|
||||||
control: lyricsEditor
|
control: lyricsEditor
|
||||||
}
|
}
|
||||||
|
@ -469,19 +469,19 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
/* Timer { */
|
||||||
id: editorTimer
|
/* id: editorTimer */
|
||||||
interval: 1000
|
/* interval: 1000 */
|
||||||
repeat: true
|
/* repeat: true */
|
||||||
running: false
|
/* running: false */
|
||||||
onTriggered: {
|
/* onTriggered: { */
|
||||||
if (lyricsEditor.text === songEditorModel.lyrics)
|
/* if (lyricsEditor.text === songEditorModel.lyrics) */
|
||||||
return;
|
/* return; */
|
||||||
else
|
/* else */
|
||||||
songEditorModel.lyrics = lyricsEditor.text;
|
/* songEditorModel.lyrics = lyricsEditor.text; */
|
||||||
/* updateLyrics(lyricsEditor.text); */
|
/* /\* updateLyrics(lyricsEditor.text); *\/ */
|
||||||
}
|
/* } */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
function changeSong(index) {
|
function changeSong(index) {
|
||||||
console.log("Preparing to change song: " + index + 1 + " out of " + songProxyModel.songModel.count);
|
console.log("Preparing to change song: " + index + 1 + " out of " + songProxyModel.songModel.count);
|
||||||
|
@ -525,12 +525,12 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLyrics(lyrics) {
|
/* function updateLyrics(lyrics) { */
|
||||||
songProxyModel.songModel.updateLyrics(songID, lyrics);
|
/* songProxyModel.songModel.updateLyrics(songID, lyrics); */
|
||||||
/* songLyrics = lyrics; */
|
/* /\* songLyrics = lyrics; *\/ */
|
||||||
clearSlides();
|
/* clearSlides(); */
|
||||||
changeSlideText(songID);
|
/* changeSlideText(songID); */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
function updateTitle(title) {
|
function updateTitle(title) {
|
||||||
songProxyModel.songModel.updateTitle(songID, title)
|
songProxyModel.songModel.updateTitle(songID, title)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue