RhythmGame 1.4.3
Loading...
Searching...
No Matches
Signals | Public Member Functions | Properties | List of all members
qml_components::ScoreDb Class Referencefinal

Provides cached results and asynchronous full scores for one profile. More...

#include <ScoreDb.h>

Inheritance diagram for qml_components::ScoreDb:
Inheritance graph
[legend]
Collaboration diagram for qml_components::ScoreDb:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ScoreDb()

qml_components::ScoreDb::ScoreDb ( db::SqliteCppDb *  scoreDb)
explicit

◆ ~ScoreDb()

qml_components::ScoreDb::~ScoreDb ( )
override

Member Function Documentation

◆ getChartResults()

const QVariantMap & qml_components::ScoreDb::getChartResults ( ) const

◆ getCourseResults()

const QVariantMap & qml_components::ScoreDb::getCourseResults ( ) const

◆ getScore()

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.

◆ getScoreSummary() [1/3]

auto qml_components::ScoreDb::getScoreSummary ( const QString &  folder)

◆ getScoreSummary() [2/3]

auto qml_components::ScoreDb::getScoreSummary ( const resource_managers::Level &  level)

◆ getScoreSummary() [3/3]

auto qml_components::ScoreDb::getScoreSummary ( const resource_managers::Table &  table)

◆ getTotalScoreCount()

auto qml_components::ScoreDb::getTotalScoreCount ( ) const

◆ getTotalStats()

auto qml_components::ScoreDb::getTotalStats ( )

◆ refreshResults()

void qml_components::ScoreDb::refreshResults ( const QStringList &  guids = {})

Refresh after a committed import, or just the changed run after saving.

◆ rememberCourseScore()

void qml_components::ScoreDb::rememberCourseScore ( const gameplay_logic::BmsScoreCourse *  score)

◆ rememberScore()

void qml_components::ScoreDb::rememberScore ( const gameplay_logic::BmsScore *  score)

◆ resultsChanged

void qml_components::ScoreDb::resultsChanged ( )
signal

Property Documentation

◆ chartResults

QVariantMap qml_components::ScoreDb::chartResults
read

Chart MD5s (upper-case) mapped to BmsResult lists, newest first.

◆ courseResults

QVariantMap qml_components::ScoreDb::courseResults
read

Course identifiers mapped to BmsResultCourse lists, newest first.


The documentation for this class was generated from the following files: