qTbot 0.87.9547b0c
qTbot is base back end library for your c++ Qt projects.
qTbot::File Class Reference

The File class is implementations for local files. More...

#include <file.h>

Public Member Functions

 File (const QSharedPointer< QNetworkReply > &replay, const QString &filePath)
 
 File (const QString &filePath)
 
const QFile & localFile () const
 
Type type () const override
 type This is type of the file object.
 
- Public Member Functions inherited from qTbot::iFile
 iFile (const QSharedPointer< QNetworkReply > &replay)
 
float uploadProgress () const
 Get the current upload progress.
 
void setUploadProgress (float newUploadProgress)
 Set the upload progress.
 
float downloadProgress () const
 Get the current download progress.
 
void setDownloadProgress (float newDownloadProgress)
 Set the download progress.
 
int error () const
 Get the error code associated with this file.
 
void setError (int newError)
 Set the error code for this file.
 
const QSharedPointer< QNetworkReply > & replay () const
 Get the shared pointer to the associated QNetworkReply.
 
bool isFinished () const
 finished return true if the request was finished else false.
 
void setDownloadRequest (const QSharedPointer< QNetworkReply > &replay)
 setDownloadRequest This method sets replay for the file.
 

Protected Slots

void handleReadReady () override
 
void handleFinished () override
 
void handleError (QNetworkReply::NetworkError error) override
 
- Protected Slots inherited from qTbot::iFile
virtual void handleReadReady ()=0
 Slot to handle when data is ready to be read.
 
virtual void handleFinished ()
 Slot to handle when the network operation is finished.
 
virtual void handleError (QNetworkReply::NetworkError error)
 Slot to handle errors in the network operation.
 

Additional Inherited Members

- Public Types inherited from qTbot::iFile
enum  Type { Local , Ram }
 The Type enum is type of the file object. More...
 
- Signals inherited from qTbot::iFile
void uploadProgressChanged ()
 Signal emitted when the upload progress changes.
 
void downloadProgressChanged ()
 Signal emitted when the download progress changes.
 
void errorChanged ()
 Signal emitted when the error code changes.
 
void replayChanged ()
 Signal emitted when the associated QNetworkReply changes.
 
void finishedChanged ()
 Signal emitted when the associated finished changes.
 
- Protected Member Functions inherited from qTbot::iFile
void setFinished (bool newFinished)
 setFinished monual sets finished flag.
 

Detailed Description

The File class is implementations for local files.

Definition at line 19 of file file.h.

Inheritance diagram for qTbot::File:
Inheritance graph
Collaboration diagram for qTbot::File:
Collaboration graph

Constructor & Destructor Documentation

◆ File() [1/2]

qTbot::File::File ( const QSharedPointer< QNetworkReply > &  replay,
const QString &  filePath 
)

Definition at line 13 of file file.cpp.

◆ File() [2/2]

qTbot::File::File ( const QString &  filePath)

Definition at line 22 of file file.cpp.

Member Function Documentation

◆ handleError

void qTbot::File::handleError ( QNetworkReply::NetworkError  error)
overrideprotectedslot

Definition at line 49 of file file.cpp.

Here is the call graph for this function:

◆ handleFinished

void qTbot::File::handleFinished ( )
overrideprotectedslot

Definition at line 43 of file file.cpp.

Here is the call graph for this function:

◆ handleReadReady

void qTbot::File::handleReadReady ( )
overrideprotectedslot

Definition at line 34 of file file.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ localFile()

const QFile & qTbot::File::localFile ( ) const

Definition at line 26 of file file.cpp.

◆ type()

iFile::Type qTbot::File::type ( ) const
overridevirtual

type This is type of the file object.

Returns
type of the file object.

Implements qTbot::iFile.

Definition at line 30 of file file.cpp.


The documentation for this class was generated from the following files: