Provides access to all downloaders from this component as a model
#include <GCF3/IGDriveLiteFileDownloaderListModel>. More...
Public Types | |
enum | Field { SourceFileId = GCF::JobListModel::Object+1, SourceFileName, SourceFileIcon, DownloadedFileName, Downloader, DownloaderTitle, DownloaderDescription, DownloaderIcon, DownloaderIconUrl, DownloaderProgress, DownloaderStatus, DownloaderIsStarted, DownloaderIsSuspended, DownloaderIsComplete, DownloaderIsRunning, DownloaderHasError, DownloaderError } |
Public Types inherited from GCF::JobListModel | |
enum | Field { Kind = Qt::UserRole+1, Title, Description, Icon, IconUrl, Progress, Status, IsStarted, IsSuspended, IsComplete, IsRunning, HasError, Error, Object } |
Public Member Functions | |
virtual GCF::IGDriveLiteFileDownloader * | downloader (const QString &id) const =0 |
GCF::IGDriveLiteFileDownloader * | downloaderAt (int index) const |
virtual Q_INVOKABLE int | downloaderCount () const =0 |
virtual Q_SIGNAL void | allDownloadsComplete ()=0 |
virtual Q_INVOKABLE void | cancelAllDownloads ()=0 |
virtual Q_INVOKABLE void | clearCompletedDownloads ()=0 |
virtual Q_INVOKABLE bool | abortDownloadAt (int index)=0 |
virtual Q_INVOKABLE bool | retryDownloadAt (int index)=0 |
virtual Q_INVOKABLE bool | suspendDownloadAt (int index)=0 |
virtual Q_INVOKABLE bool | resumeDownloadAt (int index)=0 |
Public Member Functions inherited from GCF::JobListModel | |
JobListModel (QObject *parent=0) | |
~JobListModel () | |
virtual bool | addJob (AbstractJob *job) |
void | removeJob (AbstractJob *job) |
AbstractJob * | jobAt (int index) const |
Q_INVOKABLE bool | containsJob (GCF::AbstractJob *job) const |
Q_INVOKABLE int | indexOfJob (GCF::AbstractJob *job) const |
Q_INVOKABLE QObject * | jobObjectAt (int index) const |
void | setColumns (const QList< int > &columns) |
QList< int > | columns () const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
QVariant | data (const QModelIndex &index, int role) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
QHash< int, QByteArray > | roleNames () const |
Q_INVOKABLE void | cancelAllJobs () |
Q_INVOKABLE void | clearCompletedJobs () |
Q_INVOKABLE bool | cancelJobAt (int index) |
Q_INVOKABLE bool | retryJobAt (int index) |
Q_INVOKABLE bool | suspendJobAt (int index) |
Q_INVOKABLE bool | resumeJobAt (int index) |
Public Member Functions inherited from GCF::ObjectListEventListener | |
ObjectListEventListener () | |
virtual | ~ObjectListEventListener () |
virtual QString | listenerType () const |
virtual void | objectAdded (int index, QObject *obj) |
virtual void | objectDeleted (int index, QObject *obj) |
Additional Inherited Members | |
Signals inherited from GCF::JobListModel | |
void | jobCountChanged () |
void | allJobsComplete () |
void | jobUpdated (GCF::AbstractJob *job) |
void | jobStarted (GCF::AbstractJob *job) |
void | jobSuspended (GCF::AbstractJob *job) |
void | jobResumed (GCF::AbstractJob *job) |
void | jobCompleted (GCF::AbstractJob *job) |
Properties inherited from GCF::JobListModel | |
int | jobCount |
Detailed Description
File downloader model helps to create and maintain list of file downloaders. It is caller's responsibility to delete the downloader created using the GCF::IGDriveLite::createFileDownloader(). You can access the details about a downloader at a specific index by using the enumeration values of GCF::IGDriveLiteFileDownloaderListModel::Field. Also this model provides a list of helper functions to control the downloaders at specific indexes.
Downloaders and uploaders can be visualized in QML or a List-View. For example:
Member Enumeration Documentation
The enumeration values of Field represents details of GCF::IGDriveLiteDownloader.
Member Function Documentation
|
pure virtual |
Returns downloader for the file id in the current list of downloaders.
- Parameters
-
id QString
id of item
GCF::IGDriveLiteFileDownloaderListModel::downloaderAt | ( | int | index | ) | const |
Returns the downloader at the specified index.
- Parameters
-
index index of donwloader.
|
pure virtual |
Total number of downloaders in the model.
|
pure virtual |
This signal is emitted when all the downloaders in the current list has been completed downloading.
|
pure virtual |
Cancels all the ongoing downloads in the current list of downloads.
|
pure virtual |
Removes all the downloaders that have completed downloading.
|
pure virtual |
Aborts download of downloader at the specific index.
|
pure virtual |
Retries the download of downloader at specified index.
|
pure virtual |
Suspends the download of downloader at specified index.
|
pure virtual |
Resumes the download of downloader at specified index.