AbstractArchive Class
(QInstaller::AbstractArchive)The AbstractArchive class is the base class for classes representing different archive files. It cannot be instantiated on its own but defines the API and provides common functionality when subclassed. More...
Header: | #include <AbstractArchive> |
Inherited By: | QInstaller::Lib7zArchive, QInstaller::LibArchiveArchive, and QInstaller::LibArchiveWrapper |
Public Types
enum | CompressionLevel { Non, Fastest, Fast, Normal, Maximum, Ultra } |
Public Functions
AbstractArchive(QObject *parent = nullptr) | |
virtual | ~AbstractArchive() = 0 |
virtual void | close() = 0 |
virtual bool | create(const QStringList &data) = 0 |
virtual QString | errorString() const |
virtual bool | extract(const QString &dirPath) = 0 |
virtual bool | extract(const QString &dirPath, const quint64 totalFiles) = 0 |
virtual bool | isSupported() = 0 |
virtual QVector<QInstaller::ArchiveEntry> | list() = 0 |
virtual bool | open(QIODevice::OpenMode mode) = 0 |
virtual void | setCompressionLevel(const QInstaller::AbstractArchive::CompressionLevel level) |
virtual void | setFilename(const QString &filename) = 0 |
Public Slots
virtual void | cancel() = 0 |
Signals
void | completedChanged(const quint64 completed, const quint64 total) |
void | currentEntryChanged(const QString &filename) |
Static Public Members
const QMetaObject | staticMetaObject |
Protected Functions
QInstaller::AbstractArchive::CompressionLevel | compressionLevel() const |
void | setErrorString(const QString &error) |
Detailed Description
The AbstractArchive class is the base class for classes representing different archive files. It cannot be instantiated on its own but defines the API and provides common functionality when subclassed.
Member Type Documentation
enum AbstractArchive::CompressionLevel
This enum holds the possible values for archive compression level.
Constant | Value |
---|---|
QInstaller::AbstractArchive::Non | 0 |
QInstaller::AbstractArchive::Fastest | 1 |
QInstaller::AbstractArchive::Fast | 3 |
QInstaller::AbstractArchive::Normal | 5 |
QInstaller::AbstractArchive::Maximum | 7 |
QInstaller::AbstractArchive::Ultra | 9 |
Member Function Documentation
AbstractArchive::AbstractArchive(QObject *parent = nullptr)
Constructs a new archive object with parent as parent. Cannot be called directly but instead from subclass constructors.
[pure virtual]
AbstractArchive::~AbstractArchive()
Virtual destructor for AbstractArchive
.
[pure virtual slot]
void AbstractArchive::cancel()
[pure virtual]
void AbstractArchive::close()
[signal]
void AbstractArchive::completedChanged(const quint64 completed, const quint64 total)
[protected]
QInstaller::AbstractArchive::CompressionLevel AbstractArchive::compressionLevel() const
Returns the current compression level.
See also setCompressionLevel().
[pure virtual]
bool AbstractArchive::create(const QStringList &data)
[signal]
void AbstractArchive::currentEntryChanged(const QString &filename)
[virtual]
QString AbstractArchive::errorString() const
Returns a human-readable description of the last error that occurred.
See also setErrorString().
[pure virtual]
bool AbstractArchive::extract(const QString &dirPath)
[pure virtual]
bool AbstractArchive::extract(const QString &dirPath, const quint64 totalFiles)
[pure virtual]
bool AbstractArchive::isSupported()
[pure virtual]
QVector<QInstaller::ArchiveEntry> AbstractArchive::list()
[pure virtual]
bool AbstractArchive::open(QIODevice::OpenMode mode)
[virtual]
void AbstractArchive::setCompressionLevel(const QInstaller::AbstractArchive::CompressionLevel level)
Sets the compression level for new archives to level.
See also compressionLevel().
[protected]
void AbstractArchive::setErrorString(const QString &error)
Sets a human-readable description of the current error.
See also errorString().