|
RhythmGame 1.4.3
|
Provides cached results and asynchronous full scores for one profile. More...
#include <ScoreDb.h>


Signals | |
| void | resultsChanged () |
Public Member Functions | |
| ScoreDb (db::SqliteCppDb *scoreDb) | |
| ~ScoreDb () override | |
| Q_INVOKABLE support::PendingReply * | getScore (QObject *result) |
| const QVariantMap & | getChartResults () const |
| const QVariantMap & | getCourseResults () const |
| void | refreshResults (const QStringList &guids={}) |
| void | rememberScore (const gameplay_logic::BmsScore *score) |
| void | rememberCourseScore (const gameplay_logic::BmsScoreCourse *score) |
| Q_INVOKABLE support::PendingReply * | getScoreSummary (const QString &folder) |
| Q_INVOKABLE support::PendingReply * | getScoreSummary (const resource_managers::Table &table) |
| Q_INVOKABLE support::PendingReply * | getScoreSummary (const resource_managers::Level &level) |
| Q_INVOKABLE support::PendingReply * | getTotalStats () |
| Q_INVOKABLE int | getTotalScoreCount () const |
Properties | |
| QVariantMap | chartResults |
| QVariantMap | courseResults |
Provides cached results and asynchronous full scores for one profile.
Results are loaded into memory when the profile opens and refreshed after saves and imports. chartResults and courseResults update QML bindings automatically, without SQL or replay decoding when read. Result objects keep their identity and live as long as this profile's ScoreDb. Imports update their properties in place. Deleted runs leave the maps, but retained objects remain readable until the profile closes. Full-score queries execute in the thread pool. Each returned PendingReply owns its cancellation; callers retain and cancel only the work they started. Full scores returned to QML live independently of their reply. For C++-only queries, score objects are children of the reply and share its lifetime.
|
explicit |
|
override |
| const QVariantMap & qml_components::ScoreDb::getChartResults | ( | ) | const |
| const QVariantMap & qml_components::ScoreDb::getCourseResults | ( | ) | const |
| support::PendingReply * qml_components::ScoreDb::getScore | ( | QObject * | result | ) |
Loads a BmsScore or BmsScoreCourse for a result from this profile. Concurrent requests share decoding but have independent cancellation and object lifetimes. Decoded lists share their backing storage. An idle cache retains up to 64 MiB of estimated payload; live consumers may retain more. Missing records and malformed attachments fail the reply. Imported scores may succeed without a recording or gauge history. ScoreDetails supplies a declarative QML interface to this operation.
| auto qml_components::ScoreDb::getScoreSummary | ( | const QString & | folder | ) |
| auto qml_components::ScoreDb::getScoreSummary | ( | const resource_managers::Level & | level | ) |
| auto qml_components::ScoreDb::getScoreSummary | ( | const resource_managers::Table & | table | ) |
| auto qml_components::ScoreDb::getTotalScoreCount | ( | ) | const |
| auto qml_components::ScoreDb::getTotalStats | ( | ) |
| void qml_components::ScoreDb::refreshResults | ( | const QStringList & | guids = {} | ) |
Refresh after a committed import, or just the changed run after saving.
| void qml_components::ScoreDb::rememberCourseScore | ( | const gameplay_logic::BmsScoreCourse * | score | ) |
| void qml_components::ScoreDb::rememberScore | ( | const gameplay_logic::BmsScore * | score | ) |
|
signal |
|
read |
Chart MD5s (upper-case) mapped to BmsResult lists, newest first.
|
read |
Course identifiers mapped to BmsResultCourse lists, newest first.