qTbot 0.89.ee6949a
qTbot is base back end library for your c++ Qt projects.
qTbot::VirtualFile Class Reference

The VirtualFile class write and read data from the Ram. More...

#include <virtualfile.h>

Public Member Functions

 VirtualFile (const QSharedPointer< QNetworkReply > &replay=nullptr)
 
const QByteArray & array () const
 
Type type () const override
 type This is type of the file object.
 
void setArray (const QByteArray &newArray)
 
- 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 VirtualFile class write and read data from the Ram.

Definition at line 18 of file virtualfile.h.

Inheritance diagram for qTbot::VirtualFile:
Inheritance graph
Collaboration diagram for qTbot::VirtualFile:
Collaboration graph

Constructor & Destructor Documentation

◆ VirtualFile()

qTbot::VirtualFile::VirtualFile ( const QSharedPointer< QNetworkReply > &  replay = nullptr)

Definition at line 13 of file virtualfile.cpp.

Member Function Documentation

◆ array()

const QByteArray & qTbot::VirtualFile::array ( ) const

Definition at line 16 of file virtualfile.cpp.

◆ handleError

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

Definition at line 35 of file virtualfile.cpp.

Here is the call graph for this function:

◆ handleFinished

void qTbot::VirtualFile::handleFinished ( )
overrideprotectedslot

Definition at line 30 of file virtualfile.cpp.

Here is the call graph for this function:

◆ handleReadReady

void qTbot::VirtualFile::handleReadReady ( )
overrideprotectedslot

Definition at line 24 of file virtualfile.cpp.

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

◆ setArray()

void qTbot::VirtualFile::setArray ( const QByteArray &  newArray)

Definition at line 41 of file virtualfile.cpp.

◆ type()

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

type This is type of the file object.

Returns
type of the file object.

Implements qTbot::iFile.

Definition at line 20 of file virtualfile.cpp.


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