GCF LOGO VCL LOGO
GCF::IGDriveLiteFileUploaderListModel Class Referenceabstract

Helper class for accessing details of file uploaders as model.

#include <GCF3/IGDriveLiteFileUploaderListModel>
. More...

Public Types

enum  Field {
  UploadFolderId = GCF::JobListModel::Object+1, UploadFileName, Uploader, UploaderTitle,
  UploaderDescription, UploaderIcon, UploaderIconUrl, UploaderProgress,
  UploaderStatus, UploaderIsStarted, UploaderIsSuspended, UploaderIsComplete,
  UploaderIsRunning, UploaderHasError, UploaderError
}
 
- 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::IGDriveLiteFileUploader
uploader (const QString &localFileName) const =0
 
virtual
GCF::IGDriveLiteFileUploader
uploaderAt (int index) const
 
virtual Q_INVOKABLE int uploaderCount () const =0
 
virtual Q_INVOKABLE bool abortUploadAt (int index)=0
 
virtual Q_INVOKABLE bool retryUploadAt (int index)=0
 
virtual Q_INVOKABLE bool suspendUploadAt (int index)=0
 
virtual Q_INVOKABLE bool resumeUploadAt (int index)=0
 
- Public Member Functions inherited from GCF::JobListModel
 JobListModel (QObject *parent=0)
 
 ~JobListModel ()
 
virtual bool addJob (AbstractJob *job)
 
void removeJob (AbstractJob *job)
 
AbstractJobjobAt (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 uploader model helps to create and maintain list of file uploaders. It is users responsibility to delete the uploader created using GCF::IGDriveLite::createFileUploader().

You can access the details about a uploader at a specific index by using the enumeration values of GCF::IGDriveLiteFileUploaderListModel::Field. Also this model provides a list of helper functions to control the uploaders at specific indexes.

Downloaders and uploaders can be visualized in QML or a List-View. For example:

downloads-and-uploads-qml.png

Member Enumeration Documentation

The enumeration values of Field represents details of GCF::IGDriveLiteUploader.

Enumerator
UploadFolderId 

folder id of the uploader to which file will be uploaded. [Role-name: "uploaderUploadFolderId"]

UploadFileName 

uploader file name which will be uploaded. [Role-name: "uploaderUploadFileName"]

Uploader 

uploader object. [Role-name: "uploader"]

UploaderTitle 

title of the uploader. [Role-name: "uploaderTitle"]

UploaderDescription 

description set on the uploader. [Role-name: "uploaderDescription"]

UploaderIcon 

icon of the uploader. [Role-name: "uploaderIcon"]

UploaderIconUrl 

icon url of the uploader. [Role-name: "uploaderIconUrl"]

UploaderProgress 

upload progress of the uploader. [Role-name: "uploaderProgress"]

UploaderStatus 

status of the uploader. [Role-name: "uploaderStatus"]

UploaderIsStarted 

whether uploading started. [Role-name: "uploaderIsStarted"]

UploaderIsSuspended 

whether uploader is suspended. [Role-name: "uploaderIsSuspended"]

UploaderIsComplete 

whether upload is complete. [Role-name: "uploaderIsComplete"]

UploaderIsRunning 

whether uploader is in runnning state. [Role-name: "uploaderIsRunning"]

UploaderHasError 

whether upload has any error. [Role-name: "uploaderHasError"]

UploaderError 

error while uploading. [Role-name: "uploaderError"]

Member Function Documentation

GCF::IGDriveLiteFileUploaderListModel::uploader ( const QString &  localFileName) const
pure virtual

Returns uploader for the specified file name in the current list of uploaders.

Parameters
localFileNamefile name to upload.
Returns
GCF::IGDriveLiteFileUploader
GCF::IGDriveLiteFileUploaderListModel::uploaderAt ( int  index) const
virtual

Returns the uploader at the specified index.

Parameters
indexindex of donwloader.
Returns
GCF::IGDriveLiteFileUploader
GCF::IGDriveLiteFileUploaderListModel::uploaderCount ( ) const
pure virtual

Total number of uploaders in the model.

GCF::IGDriveLiteFileUploaderListModel::abortUploadAt ( int  index)
pure virtual

Aborts upload of uploader at the specific index.

GCF::IGDriveLiteFileUploaderListModel::retryUploadAt ( int  index)
pure virtual

Retries the upload of uploader at specified index.

GCF::IGDriveLiteFileUploaderListModel::suspendUploadAt ( int  index)
pure virtual

Suspends the upload of uploader at specified index.

GCF::IGDriveLiteFileUploaderListModel::resumeUploadAt ( int  index)
pure virtual

Resumes the upload of uploader at specified index.