QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
Class allowing to manage the zip/unzip actions on project file. More...
#include <qgsarchive.h>
Public Member Functions | |
QString | auxiliaryStorageFile () const |
Returns the current .qgd auxiliary storage file or an empty string if there's none. More... | |
bool | clearProjectFile () |
Remove the current .qgs project file from the temporary directory. More... | |
QString | projectFile () const |
Returns the current .qgs project file or an empty string if there's none. More... | |
bool | unzip (const QString &zipFilename) override |
Clear the current content of this archive and unzip. More... | |
Public Member Functions inherited from QgsArchive | |
QgsArchive () | |
Constructor. More... | |
QgsArchive (const QgsArchive &other) | |
Copy constructor. More... | |
virtual | ~QgsArchive ()=default |
Destructor. More... | |
void | addFile (const QString &filename) |
Add a new file to this archive. More... | |
void | clear () |
Clear the current content of this archive and create a new temporary directory. More... | |
QString | dir () const |
Returns the current temporary directory. More... | |
bool | exists () const |
Returns true if the archive exists on the filesystem, false otherwise. More... | |
QStringList | files () const |
Returns the list of files within this archive. More... | |
QgsArchive & | operator= (const QgsArchive &other) |
bool | removeFile (const QString &filename) |
Remove a file from this archive and from the filesystem. More... | |
bool | zip (const QString &zipFilename) |
Zip the content of this archive. More... | |
Class allowing to manage the zip/unzip actions on project file.
Definition at line 121 of file qgsarchive.h.
QString QgsProjectArchive::auxiliaryStorageFile | ( | ) | const |
Returns the current .qgd auxiliary storage file or an empty string if there's none.
Definition at line 160 of file qgsarchive.cpp.
bool QgsProjectArchive::clearProjectFile | ( | ) |
Remove the current .qgs project file from the temporary directory.
true
if the file is well removed, false
otherwise Definition at line 155 of file qgsarchive.cpp.
QString QgsProjectArchive::projectFile | ( | ) | const |
Returns the current .qgs project file or an empty string if there's none.
Definition at line 134 of file qgsarchive.cpp.
|
overridevirtual |
Clear the current content of this archive and unzip.
If a project file is found in the content, then this archive may be considered as a valid one. Files are unzipped in the temporary directory.
zipFilename | The zip file to unzip |
true
if a project file has been found, false
otherwise Reimplemented from QgsArchive.
Definition at line 147 of file qgsarchive.cpp.