Pure Qt model tracking upload/download progress.
More...
#include <ComputeTransferModel.hpp>
Inherits QAbstractTableModel.
|
| enum | Column {
Direction
, Filename
, Progress
, Speed
,
Status
, ColumnCount
} |
| |
|
|
| ComputeTransferModel (QObject *parent=nullptr) |
| |
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| |
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| |
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| |
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
|
int | add_transfer (const QString &id, const QString &direction, const QString &filename) |
| | Adds a new transfer entry and returns its row index.
|
| |
|
void | update_progress (const QString &id, int progress, const QString &speed={}) |
| | Updates progress (0–100) and speed string for an existing entry.
|
| |
|
void | complete_transfer (const QString &id) |
| | Marks a transfer as complete (progress = 100).
|
| |
|
void | fail_transfer (const QString &id, const QString &reason={}) |
| | Marks a transfer as failed.
|
| |
|
void | clear_finished () |
| | Removes all completed and failed entries.
|
| |
Pure Qt model tracking upload/download progress.
No NATS; driven entirely by signals from upload/download helpers. Completed and failed transfers remain visible until explicitly cleared.