|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <QGCCompressionJob.h>
Inheritance diagram for QGCCompressionJob:
Collaboration diagram for QGCCompressionJob:Public Slots | |
| void | extractArchive (const QString &archivePath, const QString &outputDirectoryPath, qint64 maxBytes=0) |
| void | extractArchiveAtomic (const QString &archivePath, const QString &outputDirectoryPath, qint64 maxBytes=0) |
| void | decompressFile (const QString &inputPath, const QString &outputPath=QString(), qint64 maxBytes=0) |
| void | extractFile (const QString &archivePath, const QString &fileName, const QString &outputPath) |
| void | extractFiles (const QString &archivePath, const QStringList &fileNames, const QString &outputDirectoryPath) |
| void | cancel () |
| Cancel current operation. | |
Signals | |
| void | progressChanged (qreal progress) |
| Emitted when progress changes (0.0 to 1.0) | |
| void | runningChanged (bool running) |
| Emitted when running state changes. | |
| void | finished (bool success) |
| void | errorStringChanged (const QString &errorString) |
| Emitted when error string changes. | |
| void | sourcePathChanged (const QString &sourcePath) |
| Emitted when source path changes. | |
| void | outputPathChanged (const QString &outputPath) |
| Emitted when output path changes. | |
QObject wrapper for compression operations with progress signals Uses QtConcurrent and QPromise for modern async operations Can be used from C++ or QML
Example C++ usage:
Example QML usage:
Alternative: Use static async methods that return QFuture directly:
Definition at line 60 of file QGCCompressionJob.h.
|
slot |
Cancel current operation.
Definition at line 129 of file QGCCompressionJob.cc.
Referenced by QGCFileDownload::cancel().
|
slot |
Decompress single compressed file (.gz, .xz, etc.)
| inputPath | Path to compressed file |
| outputPath | Path for decompressed output (empty = auto-detect) |
| maxBytes | Maximum decompressed size (0 = unlimited) |
Definition at line 94 of file QGCCompressionJob.cc.
References QGCCompression::Auto, and QGCCompression::decompressFile().
|
signal |
Emitted when error string changes.
|
slot |
Extract archive to directory (non-atomic, faster)
| archivePath | Path to archive file |
| outputDirectoryPath | Directory to extract to |
| maxBytes | Maximum decompressed size (0 = unlimited) |
Definition at line 68 of file QGCCompressionJob.cc.
References QGCCompression::Auto, and QGCCompression::extractArchive().
Referenced by PlanMasterController::loadFromArchive().
|
slot |
Extract archive atomically (all-or-nothing, safer)
| archivePath | Path to archive file |
| outputDirectoryPath | Directory to extract to |
| maxBytes | Maximum decompressed size (0 = unlimited) |
Definition at line 81 of file QGCCompressionJob.cc.
References QGCCompression::Auto, and QGCCompression::extractArchiveAtomic().
|
slot |
Extract single file from archive
| archivePath | Path to archive file |
| fileName | Name of file inside archive |
| outputPath | Output file path |
Definition at line 107 of file QGCCompressionJob.cc.
References QGCCompression::extractFile().
|
slot |
Extract multiple files from archive
| archivePath | Path to archive file |
| fileNames | Names of files inside archive |
| outputDirectoryPath | Output directory |
Definition at line 118 of file QGCCompressionJob.cc.
References QGCCompression::extractFiles().
|
signal |
Emitted when operation completes
| success | true if operation succeeded |
Referenced by PlanMasterController::loadFromArchive().
|
signal |
Emitted when output path changes.
|
signal |
Emitted when progress changes (0.0 to 1.0)
|
signal |
Emitted when running state changes.
|
signal |
Emitted when source path changes.