diff --git a/src/cpp/songsqlmodel.cpp b/src/cpp/songsqlmodel.cpp index c67e087..c729b89 100644 --- a/src/cpp/songsqlmodel.cpp +++ b/src/cpp/songsqlmodel.cpp @@ -760,6 +760,12 @@ QModelIndex SongProxyModel::idx(int row) { return idx; } +QStringList SongProxyModel::getLyricList(const int &row) { + auto model = qobject_cast(sourceModel()); + QStringList lyrics = model->getLyricList(mapToSource(index(row, 0)).row()); + return lyrics; +} + QVariantMap SongProxyModel::getSong(const int &row) { auto model = qobject_cast(sourceModel()); QVariantMap song = model->getSong(mapToSource(index(row, 0)).row()); diff --git a/src/cpp/songsqlmodel.h b/src/cpp/songsqlmodel.h index d355510..d33b5da 100644 --- a/src/cpp/songsqlmodel.h +++ b/src/cpp/songsqlmodel.h @@ -129,6 +129,7 @@ public: public slots: Q_INVOKABLE QVariantMap getSong(const int &row); Q_INVOKABLE void deleteSong(const int &row); + Q_INVOKABLE QStringList getLyricList(const int &row); // Q_INVOKABLE void select(int row); // Q_INVOKABLE void selectSongs(int row); // Q_INVOKABLE bool setSelected(const int &row, const bool &select);