|
RhythmGame 1.4.3
|
#include <ScoreSyncOperation.h>


Signals | |
| void | progressChanged () |
| void | finishedChanged () |
| void | error (const QString &message) |
| void | errorsChanged () |
Public Member Functions | |
| ScoreSyncOperation (QObject *parent=nullptr) | |
| ~ScoreSyncOperation () override | |
| void | start (QStringList guids, std::function< void(const QString &)> dispatch) |
| void | ownReply (QNetworkReply *reply) |
| Q_INVOKABLE void | cancel () |
| auto | getDone () const -> int |
| auto | getTotal () const -> int |
| auto | isFinished () const -> bool |
| auto | isCancelled () const -> bool |
| auto | getErrorCount () const -> int |
| auto | getLastError () const -> QString |
| void | setTotal (int total) |
| void | setFinished (bool value) |
| void | increment () |
| void | reportError (const QString &message) |
| Records an error without stopping the operation. | |
Static Public Attributes | |
| static constexpr int | concurrency = 4 |
Properties | |
| QML_ELEMENTint | done |
| int | total { 0 } |
| bool | finished |
| int | errorCount |
| QString | lastError |
| bool | cancelled |
Tracks progress and errors for a score upload, download, or import. Uploads and downloads queue scores once the server diff is known and prepare or transfer at most four at once. Errors do not stop the queue. Cancellation aborts owned replies and discards queued work. Finished operations cannot restart.
|
explicit |
|
override |
| void qml_components::ScoreSyncOperation::cancel | ( | ) |
|
signal |
|
signal |
|
signal |
|
inline |
|
inline |
|
inline |
|
inline |
| void qml_components::ScoreSyncOperation::increment | ( | ) |
Marks one item done and emits progressChanged(). Finishes the operation when done reaches total.
|
inline |
| auto qml_components::ScoreSyncOperation::isFinished | ( | ) | const -> bool |
| void qml_components::ScoreSyncOperation::ownReply | ( | QNetworkReply * | reply | ) |
|
signal |
| void qml_components::ScoreSyncOperation::reportError | ( | const QString & | message | ) |
Records an error without stopping the operation.
| void qml_components::ScoreSyncOperation::setFinished | ( | bool | value | ) |
Marks the operation finished when value is true. Emits finishedChanged() once.
| void qml_components::ScoreSyncOperation::setTotal | ( | int | total | ) |
Sets the total number of items and emits progressChanged(). A zero total finishes the operation.
| void qml_components::ScoreSyncOperation::start | ( | QStringList | guids, |
| std::function< void(const QString &)> | dispatch | ||
| ) |
|
staticconstexpr |
|
read |
|
read |
|
read |
|
read |
|
read |
|
read |