Songbook-Client  0.7
This application is a manager of customguitar songbooks
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Slots | Public Member Functions
CLibraryDownload Class Reference

CLibraryDownload is a dialog to download a songbook from a remote url. More...

#include <library-download.hh>

List of all members.

Public Slots

void downloadFinished ()
void sslErrors (const QList< QSslError > &errors)
void downloadStart ()
 Network initialisation before download.
void downloadProgress (qint64 bytesRead, qint64 totalBytes)
void cancelDownload ()

Public Member Functions

 CLibraryDownload (CMainWindow *parent)
 Constructor.
 ~CLibraryDownload ()
 Destructor.
bool saveToDisk (const QString &filename, QIODevice *data)
bool decompress (const QString &filename, QDir &directory)

Detailed Description

CLibraryDownload is a dialog to download a songbook from a remote url.

download.png

The remote url can be a git repository or a tar.gz archive.


Member Function Documentation

bool CLibraryDownload::decompress ( const QString &  filename,
QDir &  directory 
)

Decompress an archive depending on libarchive library (http://github.com/libarchive/libarchive).

Parameters:
filename: filename of the compressed archive
directory: the directory resulting from the decompression
Returns:
true if the operation succeeded, false otherwise
void CLibraryDownload::downloadFinished ( )
slot

Handles common errors and dialog at the end of the downloading operation such as conflicts with filenames or failed download.

bool CLibraryDownload::saveToDisk ( const QString &  filename,
QIODevice *  data 
)

Save some data as a new file.

Parameters:
filename: filename of the new file on disk
data: the data to be saved
Returns:
true if the operation succeeded, false otherwise

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