adding some more todos and refactoring getSong so it's more future proof
This commit is contained in:
parent
e52d44f937
commit
deb620a2eb
6 changed files with 89 additions and 55 deletions
55
TODO.org
55
TODO.org
|
@ -1,7 +1,38 @@
|
||||||
#+TITLE: Todo List
|
#+TITLE: Todo List
|
||||||
* Inbox
|
* Inbox
|
||||||
|
** TODO BUG in dropping and then selecting song will duplicate entries
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/LeftDock.qml::Layout.fillHeight: true]]
|
||||||
|
|
||||||
|
or at least turns the entry above it into the same as itself while retaining it's title.
|
||||||
|
|
||||||
** TODO Build out a slide preview system so we can see each slide in the song or image slideshow
|
** TODO Build out a slide preview system so we can see each slide in the song or image slideshow
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Presenter.SlideEditor {]]
|
[[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Presenter.SlideEditor {]]
|
||||||
|
|
||||||
|
** TODO Fix possible bug in arrangingItems in draghandler
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/DragHandle.qml::function arrangeItem() {]]
|
||||||
|
|
||||||
|
** TODO [#A] Make Presentation Window follow the presenter component
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/MainWindow.qml::Presenter.Slide {]]
|
||||||
|
|
||||||
|
** TODO Make toolbar functional for songeditor
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Controls.ToolBar {]]
|
||||||
|
|
||||||
|
- [ ] Will likely need to modify the model to persist the effects stored to the songs. Alignment is done, need vertical alignment, font, and effects
|
||||||
|
|
||||||
|
** TODO Finish toolbar
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::Controls.ToolBar {]]
|
||||||
|
|
||||||
|
** TODO Find a way to maths the textsize
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/Slide.qml::property real textSize: 50]]
|
||||||
|
|
||||||
|
** TODO Fix broken append when importing River song
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/LeftDock.qml::function appendItem(name, type, background, backgroundType, text, itemID) {]]
|
||||||
|
|
||||||
|
** TODO Create a nextslide function to be used after the end of the list of slides
|
||||||
|
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function nextSlide() {]]
|
||||||
|
|
||||||
|
- [ ] Check to make sure this works in all conditions but I believe it works ok.
|
||||||
|
|
||||||
** TODO Make sure the video gets changed in a proper manner to not have left over video showing from previous items
|
** TODO Make sure the video gets changed in a proper manner to not have left over video showing from previous items
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::currentServiceItem++;]]
|
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::currentServiceItem++;]]
|
||||||
|
|
||||||
|
@ -10,30 +41,6 @@
|
||||||
|
|
||||||
The second option is the best, but requires a lot more work. I have the first already working so I'll come back to this once I have more of an idea of how to do it.
|
The second option is the best, but requires a lot more work. I have the first already working so I'll come back to this once I have more of an idea of how to do it.
|
||||||
|
|
||||||
** TODO Fix possible bug in arrangingItems in draghandler
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/DragHandle.qml::function arrangeItem() {]]
|
|
||||||
** TODO [#A] Make Presentation Window follow the presenter component
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/MainWindow.qml::Presenter.Slide {]]
|
|
||||||
|
|
||||||
** TODO Make toolbar functional for songeditor
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Controls.ToolBar {]]
|
|
||||||
|
|
||||||
- [ ] Will likely need to modify the model to persist the effects stored to the songs
|
|
||||||
** TODO Finish toolbar
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::Controls.ToolBar {]]
|
|
||||||
|
|
||||||
|
|
||||||
** TODO Find a way to maths the textsize
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/Slide.qml::property real textSize: 50]]
|
|
||||||
|
|
||||||
** TODO Create a nextslide function to be used after the end of the list of slides
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function nextSlide() {]]
|
|
||||||
|
|
||||||
- [ ] Check to make sure this works in all conditions but I believe it works ok.
|
|
||||||
|
|
||||||
** TODO Fix broken append when importing River song
|
|
||||||
[[file:~/dev/church-presenter/src/qml/presenter/LeftDock.qml::function appendItem(name, type, background, backgroundType, text, itemID) {]]
|
|
||||||
|
|
||||||
** DONE Need to make ListModel capable of bringing in a string list [2/2] [100%]
|
** DONE Need to make ListModel capable of bringing in a string list [2/2] [100%]
|
||||||
- [X] Create a Model
|
- [X] Create a Model
|
||||||
- [X] Create a class that we'll make a list of in the model
|
- [X] Create a class that we'll make a list of in the model
|
||||||
|
|
|
@ -47,10 +47,12 @@ Item {
|
||||||
enableAudio: !preview
|
enableAudio: !preview
|
||||||
Component.onCompleted: mpvLoadingTimer.start()
|
Component.onCompleted: mpvLoadingTimer.start()
|
||||||
onFileLoaded: {
|
onFileLoaded: {
|
||||||
showPassiveNotification(videoSource + " has been loaded");
|
/* showPassiveNotification(videoSource + " has been loaded"); */
|
||||||
if (itemType == "song")
|
if (itemType == "song")
|
||||||
mpv.setProperty("loop", "inf");
|
mpv.setProperty("loop", "inf");
|
||||||
showPassiveNotification(mpv.getProperty("loop"));
|
else
|
||||||
|
mpv.setProperty("loop", "no");
|
||||||
|
/* showPassiveNotification(mpv.getProperty("loop")); */
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -148,4 +150,8 @@ Item {
|
||||||
black.visible = true;
|
black.visible = true;
|
||||||
showPassiveNotification("Black is: " + black.visible);
|
showPassiveNotification("Black is: " + black.visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pauseVideo() {
|
||||||
|
mpv.pause();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,11 @@ Item {
|
||||||
|
|
||||||
Component.onCompleted: updateHAlignment(textAlignment)
|
Component.onCompleted: updateHAlignment(textAlignment)
|
||||||
|
|
||||||
|
function loadVideo() {
|
||||||
|
representation.loadVideo();
|
||||||
|
representation.pause();
|
||||||
|
}
|
||||||
|
|
||||||
function updateHAlignment(alignment) {
|
function updateHAlignment(alignment) {
|
||||||
switch (alignment) {
|
switch (alignment) {
|
||||||
case "left" :
|
case "left" :
|
||||||
|
|
|
@ -277,21 +277,22 @@ Item {
|
||||||
function changeSong(index) {
|
function changeSong(index) {
|
||||||
const song = songsqlmodel.getSong(index);
|
const song = songsqlmodel.getSong(index);
|
||||||
songIndex = index;
|
songIndex = index;
|
||||||
songTitle = song[0];
|
songTitle = song.title;
|
||||||
songLyrics = song[1];
|
songLyrics = song.lyrics;
|
||||||
songAuthor = song[2];
|
songAuthor = song.author;
|
||||||
songCcli = song[3];
|
songCcli = song.ccli;
|
||||||
songAudio = song[4];
|
songAudio = song.audio;
|
||||||
songVorder = song[5];
|
songVorder = song.vorder;
|
||||||
songBackground = song[6];
|
songBackground = song.background;
|
||||||
songBackgroundType = song[7];
|
songBackgroundType = song.backgroundType;
|
||||||
songHAlignment = song[8];
|
songHAlignment = song.textAlignment;
|
||||||
if (songBackgroundType == "image") {
|
if (songBackgroundType == "image") {
|
||||||
slideEditor.videoBackground = "";
|
slideEditor.videoBackground = "";
|
||||||
slideEditor.imageBackground = songBackground;
|
slideEditor.imageBackground = songBackground;
|
||||||
} else {
|
} else {
|
||||||
slideEditor.imageBackground = "";
|
slideEditor.imageBackground = "";
|
||||||
slideEditor.videoBackground = songBackground;
|
slideEditor.videoBackground = songBackground;
|
||||||
|
slideEditor.loadVideo();
|
||||||
}
|
}
|
||||||
print(song);
|
print(song);
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,26 +122,41 @@ void SongSqlModel::deleteSong(const int &row) {
|
||||||
submitAll();
|
submitAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantList SongSqlModel::getSong(const int &row) {
|
QVariantMap SongSqlModel::getSong(const int &row) {
|
||||||
QSqlRecord recordData = record(row);
|
// QSqlRecord recordData = record(row);
|
||||||
if (recordData.isEmpty()) {
|
// if (recordData.isEmpty()) {
|
||||||
qDebug() << "this is not a song";
|
// qDebug() << "this is not a song";
|
||||||
QVariantList empty;
|
// QVariantList empty;
|
||||||
return empty;
|
// return empty;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// QVariantList song;
|
||||||
|
// song.append(recordData.value("title"));
|
||||||
|
// song.append(recordData.value("lyrics"));
|
||||||
|
// song.append(recordData.value("author"));
|
||||||
|
// song.append(recordData.value("ccli"));
|
||||||
|
// song.append(recordData.value("audio"));
|
||||||
|
// song.append(recordData.value("vorder"));
|
||||||
|
// song.append(recordData.value("background"));
|
||||||
|
// song.append(recordData.value("backgroundType"));
|
||||||
|
// song.append(recordData.value("textAlignment"));
|
||||||
|
|
||||||
|
// return song;
|
||||||
|
|
||||||
|
QVariantMap data;
|
||||||
|
const QModelIndex idx = this->index(row,0);
|
||||||
|
// qDebug() << idx;
|
||||||
|
if( !idx.isValid() )
|
||||||
|
return data;
|
||||||
|
const QHash<int,QByteArray> rn = roleNames();
|
||||||
|
// qDebug() << rn;
|
||||||
|
QHashIterator<int,QByteArray> it(rn);
|
||||||
|
while (it.hasNext()) {
|
||||||
|
it.next();
|
||||||
|
qDebug() << it.key() << ":" << it.value();
|
||||||
|
data[it.value()] = idx.data(it.key());
|
||||||
}
|
}
|
||||||
|
return data;
|
||||||
QVariantList song;
|
|
||||||
song.append(recordData.value("title"));
|
|
||||||
song.append(recordData.value("lyrics"));
|
|
||||||
song.append(recordData.value("author"));
|
|
||||||
song.append(recordData.value("ccli"));
|
|
||||||
song.append(recordData.value("audio"));
|
|
||||||
song.append(recordData.value("vorder"));
|
|
||||||
song.append(recordData.value("background"));
|
|
||||||
song.append(recordData.value("backgroundType"));
|
|
||||||
song.append(recordData.value("textAlignment"));
|
|
||||||
|
|
||||||
return song;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList SongSqlModel::getLyricList(const int &row) {
|
QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE void newSong();
|
Q_INVOKABLE void newSong();
|
||||||
Q_INVOKABLE void deleteSong(const int &row);
|
Q_INVOKABLE void deleteSong(const int &row);
|
||||||
Q_INVOKABLE QVariantList getSong(const int &row);
|
Q_INVOKABLE QVariantMap getSong(const int &row);
|
||||||
Q_INVOKABLE QStringList getLyricList(const int &row);
|
Q_INVOKABLE QStringList getLyricList(const int &row);
|
||||||
|
|
||||||
QVariant data(const QModelIndex &index, int role) const override;
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue