adding a getLyricList function to songProxyModel

This commit is contained in:
Chris Cochrun 2023-02-24 15:02:05 -06:00
parent bac52666c8
commit a80cad73eb
2 changed files with 7 additions and 0 deletions

View file

@ -760,6 +760,12 @@ QModelIndex SongProxyModel::idx(int row) {
return idx;
}
QStringList SongProxyModel::getLyricList(const int &row) {
auto model = qobject_cast<SongSqlModel *>(sourceModel());
QStringList lyrics = model->getLyricList(mapToSource(index(row, 0)).row());
return lyrics;
}
QVariantMap SongProxyModel::getSong(const int &row) {
auto model = qobject_cast<SongSqlModel *>(sourceModel());
QVariantMap song = model->getSong(mapToSource(index(row, 0)).row());