|
RhythmGame 1.4.3
|
Tracks the progress of an asynchronous replay import. More...
#include <ReplayImportOperation.h>


Public Types | |
| enum | Roles { MessageRole = Qt::UserRole } |
Signals | |
| void | progressChanged () |
| void | finishedChanged () |
| void | countChanged () |
| void | error (const QString &message) |
Public Member Functions | |
| ReplayImportOperation (int total, QObject *parent=nullptr) | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| QHash< int, QByteArray > | roleNames () const override |
| auto | getDone () const -> int |
| auto | getTotal () const -> int |
| auto | getImported () const -> int |
| auto | getSkipped () const -> int |
| auto | getErrored () const -> int |
| auto | isFinished () const -> bool |
| void | setTotal (int total) |
| void | finish () |
| void | fail (const QString &message) |
| void | incrementImported () |
| void | incrementSkipped () |
| void | incrementErrored () |
| void | reportError (const QString &message) |
Properties | |
| QML_ELEMENTint | done |
| int | total |
| int | imported |
| int | skipped |
| int | errored |
| bool | finished |
| int | count |
Tracks the progress of an asynchronous replay import.
Each processed file (whether imported, skipped, or failed) increments done toward total. The error() signal fires for each failure without halting the operation.
|
explicit |
|
signal |
|
override |
|
signal |
| void qml_components::ReplayImportOperation::fail | ( | const QString & | message | ) |
Reports a fatal worker failure and finishes the operation (main thread).
| void qml_components::ReplayImportOperation::finish | ( | ) |
Called on the main thread after the worker has committed all its saves.
|
signal |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void qml_components::ReplayImportOperation::incrementErrored | ( | ) |
Called on the main thread when a replay failed to import.
| void qml_components::ReplayImportOperation::incrementImported | ( | ) |
Called on the main thread when a replay was successfully saved.
| void qml_components::ReplayImportOperation::incrementSkipped | ( | ) |
Called on the main thread when a replay was already present and skipped.
|
inline |
|
signal |
| void qml_components::ReplayImportOperation::reportError | ( | const QString & | message | ) |
Emits the error() signal with the given message (main thread).
|
override |
|
override |
| void qml_components::ReplayImportOperation::setTotal | ( | int | total | ) |
Called on the main thread after discovering the work to import.
|
read |
|
read |
|
read |
|
read |
|
read |
|
read |
|
read |