QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCArchiveWatcher Class Reference

#include <QGCArchiveWatcher.h>

+ Inheritance diagram for QGCArchiveWatcher:
+ Collaboration diagram for QGCArchiveWatcher:

Signals

void archiveDetected (const QString &archivePath, QGCCompression::Format format)
 
void extractionComplete (const QString &archivePath, const QString &outputPath, bool success, const QString &errorString)
 
void autoDecompressChanged (bool autoDecompress)
 Property change signals.
 
void extractingChanged (bool extracting)
 
void progressChanged (qreal progress)
 
void outputDirectoryChanged (const QString &directory)
 

Detailed Description

Watches directories for new archive files and optionally auto-decompresses them

Example usage:

watcher.setAutoDecompress(true);
watcher.setOutputDirectory("/extracted");
[](const QString &path) {
qDebug() << "Found archive:" << path;
});
[](const QString &archive, const QString &output, bool success) {
qDebug() << "Extracted" << archive << "to" << output
<< (success ? "OK" : "FAILED");
});
watcher.watchDirectory("/downloads");
void extractionComplete(const QString &archivePath, const QString &outputPath, bool success, const QString &errorString)
void archiveDetected(const QString &archivePath, QGCCompression::Format format)

Definition at line 36 of file QGCArchiveWatcher.h.

Member Function Documentation

◆ archiveDetected

void QGCArchiveWatcher::archiveDetected ( const QString &  archivePath,
QGCCompression::Format  format 
)
signal

Emitted when an archive file is detected in a watched directory

Parameters
archivePathFull path to the archive file
formatDetected format

◆ autoDecompressChanged

void QGCArchiveWatcher::autoDecompressChanged ( bool  autoDecompress)
signal

Property change signals.

◆ extractingChanged

void QGCArchiveWatcher::extractingChanged ( bool  extracting)
signal

◆ extractionComplete

void QGCArchiveWatcher::extractionComplete ( const QString &  archivePath,
const QString &  outputPath,
bool  success,
const QString &  errorString 
)
signal

Emitted when extraction completes (only if autoDecompress is enabled)

Parameters
archivePathPath to the source archive
outputPathPath to extracted files/directory
successtrue if extraction succeeded
errorStringError message if failed

◆ outputDirectoryChanged

void QGCArchiveWatcher::outputDirectoryChanged ( const QString &  directory)
signal

◆ progressChanged

void QGCArchiveWatcher::progressChanged ( qreal  progress)
signal

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