lyrics system update
This commit is contained in:
parent
7c1ff53074
commit
9bd6adb2f3
2 changed files with 16 additions and 5 deletions
|
@ -59,7 +59,6 @@ Controls.Page {
|
||||||
Item {
|
Item {
|
||||||
id: mainPageArea
|
id: mainPageArea
|
||||||
Controls.SplitView.fillWidth: true
|
Controls.SplitView.fillWidth: true
|
||||||
/* Controls.SplitView.preferredWidth: 500 */
|
|
||||||
Controls.SplitView.minimumWidth: 100
|
Controls.SplitView.minimumWidth: 100
|
||||||
|
|
||||||
Presenter.Presentation {
|
Presenter.Presentation {
|
||||||
|
|
|
@ -154,22 +154,34 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
int endIndex;
|
int endIndex;
|
||||||
QString line;
|
QString line;
|
||||||
QString verse;
|
QString verse;
|
||||||
|
qDebug() << vorder.contains("C1");
|
||||||
|
qDebug() << vorder.indexOf("C1");
|
||||||
|
foreach (QString vstr, vorder) {
|
||||||
|
foreach (line, rawLyrics) {
|
||||||
|
if (line.startsWith(vstr.at(0)) && line.endsWith(vstr.at(1))) {
|
||||||
|
qDebug() << line;
|
||||||
|
startIndex = rawLyrics.indexOf(line);
|
||||||
|
}
|
||||||
|
if (rawLyrics.indexOf(line) > startIndex)
|
||||||
|
verse.append(line + "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
foreach (line, rawLyrics) {
|
foreach (line, rawLyrics) {
|
||||||
if (line.trimmed() == "Chorus 1") {
|
if (line.trimmed() == "Chorus 1") {
|
||||||
startIndex = rawLyrics.indexOf(line) + 1;
|
startIndex = rawLyrics.indexOf(line) + 1;
|
||||||
qDebug() << line;
|
// qDebug() << line;
|
||||||
qDebug() << startIndex;
|
// qDebug() << startIndex;
|
||||||
}
|
}
|
||||||
if (line.trimmed() == "Verse 1") {
|
if (line.trimmed() == "Verse 1") {
|
||||||
endIndex = rawLyrics.indexOf(line);
|
endIndex = rawLyrics.indexOf(line);
|
||||||
qDebug() << endIndex;
|
// qDebug() << endIndex;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rawLyrics.indexOf(line) == startIndex - 1) {
|
if (rawLyrics.indexOf(line) == startIndex - 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
verse.append(line + "\n");
|
verse.append(line + "\n");
|
||||||
qDebug() << verse;
|
// qDebug() << verse;
|
||||||
}
|
}
|
||||||
|
|
||||||
lyrics.append(verse);
|
lyrics.append(verse);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue