The iFile class This is main interface for all implementations of the files.
More...
#include <ifile.h>
|
| 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.
|
|
virtual Type | type () const =0 |
| type This is type of the file object.
|
|
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.
|
|
|
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.
|
|
|
void | setFinished (bool newFinished) |
| setFinished monual sets finished flag.
|
|
The iFile class This is main interface for all implementations of the files.
Definition at line 20 of file ifile.h.
◆ Type
The Type enum is type of the file object.
Enumerator |
---|
Local | This is local file, all receive bytes will be save directed into file.
|
Ram | This is memory saved file. All received bytes will be saved into QByteArray object.
|
Definition at line 28 of file ifile.h.
◆ iFile()
qTbot::iFile::iFile |
( |
const QSharedPointer< QNetworkReply > & |
replay | ) |
|
◆ downloadProgress()
float qTbot::iFile::downloadProgress |
( |
| ) |
const |
Get the current download progress.
- Returns
- The current download progress as a floating-point value.
Definition at line 28 of file ifile.cpp.
◆ downloadProgressChanged
void qTbot::iFile::downloadProgressChanged |
( |
| ) |
|
|
signal |
Signal emitted when the download progress changes.
◆ error()
int qTbot::iFile::error |
( |
| ) |
const |
Get the error code associated with this file.
- Returns
- The error code as an integer value.
Definition at line 40 of file ifile.cpp.
◆ errorChanged
void qTbot::iFile::errorChanged |
( |
| ) |
|
|
signal |
Signal emitted when the error code changes.
◆ finishedChanged
void qTbot::iFile::finishedChanged |
( |
| ) |
|
|
signal |
Signal emitted when the associated finished changes.
◆ handleError
void qTbot::iFile::handleError |
( |
QNetworkReply::NetworkError |
error | ) |
|
|
protectedvirtualslot |
Slot to handle errors in the network operation.
- Parameters
-
Definition at line 59 of file ifile.cpp.
◆ handleFinished
void qTbot::iFile::handleFinished |
( |
| ) |
|
|
protectedvirtualslot |
Slot to handle when the network operation is finished.
Definition at line 122 of file ifile.cpp.
◆ handleReadReady
virtual void qTbot::iFile::handleReadReady |
( |
| ) |
|
|
protectedpure virtualslot |
Slot to handle when data is ready to be read.
◆ isFinished()
bool qTbot::iFile::isFinished |
( |
| ) |
const |
finished return true if the request was finished else false.
- Returns
- true if the request was finished else false
Definition at line 55 of file ifile.cpp.
◆ replay()
const QSharedPointer< QNetworkReply > & qTbot::iFile::replay |
( |
| ) |
const |
Get the shared pointer to the associated QNetworkReply.
- Returns
- A shared pointer to the associated QNetworkReply.
Definition at line 51 of file ifile.cpp.
◆ replayChanged
void qTbot::iFile::replayChanged |
( |
| ) |
|
|
signal |
Signal emitted when the associated QNetworkReply changes.
◆ setDownloadProgress()
void qTbot::iFile::setDownloadProgress |
( |
float |
newDownloadProgress | ) |
|
Set the download progress.
- Parameters
-
newDownloadProgress | The new download progress value to set. |
Definition at line 32 of file ifile.cpp.
◆ setDownloadRequest()
void qTbot::iFile::setDownloadRequest |
( |
const QSharedPointer< QNetworkReply > & |
replay | ) |
|
setDownloadRequest This method sets replay for the file.
- Parameters
-
replay | This is pointer to the replay. |
Definition at line 74 of file ifile.cpp.
◆ setError()
void qTbot::iFile::setError |
( |
int |
newError | ) |
|
Set the error code for this file.
- Parameters
-
newError | The new error code to set. |
Definition at line 44 of file ifile.cpp.
◆ setFinished()
void qTbot::iFile::setFinished |
( |
bool |
newFinished | ) |
|
|
protected |
setFinished monual sets finished flag.
- Parameters
-
newFinished | new value for the finished flag. |
Definition at line 114 of file ifile.cpp.
◆ setUploadProgress()
void qTbot::iFile::setUploadProgress |
( |
float |
newUploadProgress | ) |
|
Set the upload progress.
- Parameters
-
newUploadProgress | The new upload progress value to set. |
Definition at line 20 of file ifile.cpp.
◆ type()
virtual Type qTbot::iFile::type |
( |
| ) |
const |
|
pure virtual |
◆ uploadProgress()
float qTbot::iFile::uploadProgress |
( |
| ) |
const |
Get the current upload progress.
- Returns
- The current upload progress as a floating-point value.
Definition at line 16 of file ifile.cpp.
◆ uploadProgressChanged
void qTbot::iFile::uploadProgressChanged |
( |
| ) |
|
|
signal |
Signal emitted when the upload progress changes.
◆ ITelegramBot
The documentation for this class was generated from the following files: