LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LibraryDownload Class Referencefinal

The LibraryDownload class. More...

#include <librarydownload.h>

Inherits QObject.

+ Collaboration diagram for LibraryDownload:

Public Slots

void start () noexcept
 Start downloading the library. More...
 
void abort () noexcept
 Abort downloading the library. More...
 

Signals

void progressState (const QString &status)
 
void progressPercent (int percent)
 
void finished (bool success, const QString &errMsg)
 
void abortRequested ()
 

Public Member Functions

 LibraryDownload ()=delete
 
 LibraryDownload (const LibraryDownload &other)=delete
 
 LibraryDownload (const QUrl &urlToZip, const FilePath &destDir) noexcept
 
 ~LibraryDownload () noexcept
 
const FilePathgetDestinationDir () const noexcept
 
void setExpectedZipFileSize (qint64 bytes) noexcept
 Set the expected size of the requested content. More...
 
void setExpectedChecksum (QCryptographicHash::Algorithm algorithm, const QByteArray &checksum) noexcept
 
LibraryDownloadoperator= (const LibraryDownload &rhs)=delete
 

Private Member Functions

void downloadErrored (const QString &errMsg) noexcept
 
void downloadAborted () noexcept
 
void downloadSucceeded () noexcept
 
FilePath getPathToLibDir () noexcept
 

Private Attributes

QScopedPointer< FileDownloadmFileDownload
 
FilePath mDestDir
 
FilePath mTempDestDir
 

Detailed Description

The LibraryDownload class.

Author
ubruhin
Date
2016-10-01

Constructor & Destructor Documentation

LibraryDownload ( )
delete
LibraryDownload ( const LibraryDownload other)
delete
LibraryDownload ( const QUrl &  urlToZip,
const FilePath destDir 
)
noexcept

+ Here is the call graph for this function:

~LibraryDownload ( )
noexcept

+ Here is the call graph for this function:

Member Function Documentation

const FilePath& getDestinationDir ( ) const
inlinenoexcept
void setExpectedZipFileSize ( qint64  bytes)
noexcept

Set the expected size of the requested content.

If set, this size will be used to calculate the download progress in percent in case that there is no "Content-Length" attribute in the received HTTP header.

Parameters
bytesExpected content size of the reply in bytes
void setExpectedChecksum ( QCryptographicHash::Algorithm  algorithm,
const QByteArray &  checksum 
)
noexcept

LibraryDownload& operator= ( const LibraryDownload rhs)
delete
void start ( )
slotnoexcept

Start downloading the library.

+ Here is the call graph for this function:

void abort ( )
slotnoexcept

Abort downloading the library.

+ Here is the caller graph for this function:

void progressState ( const QString &  status)
signal

+ Here is the caller graph for this function:

void progressPercent ( int  percent)
signal

+ Here is the caller graph for this function:

void finished ( bool  success,
const QString &  errMsg 
)
signal

+ Here is the caller graph for this function:

void abortRequested ( )
signal

+ Here is the caller graph for this function:

void downloadErrored ( const QString &  errMsg)
privatenoexcept

+ Here is the caller graph for this function:

void downloadAborted ( )
privatenoexcept

+ Here is the caller graph for this function:

void downloadSucceeded ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FilePath getPathToLibDir ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

QScopedPointer<FileDownload> mFileDownload
private
FilePath mDestDir
private
FilePath mTempDestDir
private

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