QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsProjectArchive Class Reference

Class allowing to manage the zip/unzip actions on project file. More...

#include <qgsarchive.h>

Inheritance diagram for QgsProjectArchive:
Inheritance graph
[legend]

Public Member Functions

QString auxiliaryStorageFile () const
 Returns the current .qgd auxiliary storage file or an empty string if there's none.
 
bool clearProjectFile ()
 Remove the current .qgs project file from the temporary directory.
 
QString projectFile () const
 Returns the current .qgs project file or an empty string if there's none.
 
bool unzip (const QString &zipFilename) override
 Clear the current content of this archive and unzip.
 
- Public Member Functions inherited from QgsArchive
 QgsArchive ()
 Constructor.
 
 QgsArchive (const QgsArchive &other)
 Copy constructor.
 
virtual ~QgsArchive ()=default
 Destructor.
 
void addFile (const QString &filename)
 Add a new file to this archive.
 
void clear ()
 Clear the current content of this archive and create a new temporary directory.
 
QString dir () const
 Returns the current temporary directory.
 
bool exists () const
 Returns true if the archive exists on the filesystem, false otherwise.
 
QStringList files () const
 Returns the list of files within this archive.
 
QgsArchiveoperator= (const QgsArchive &other)
 
bool removeFile (const QString &filename)
 Remove a file from this archive and from the filesystem.
 
bool zip (const QString &zipFilename)
 Zip the content of this archive.
 

Detailed Description

Class allowing to manage the zip/unzip actions on project file.

Since
QGIS 3.0

Definition at line 121 of file qgsarchive.h.

Member Function Documentation

◆ auxiliaryStorageFile()

QString QgsProjectArchive::auxiliaryStorageFile ( ) const

Returns the current .qgd auxiliary storage file or an empty string if there's none.

Definition at line 166 of file qgsarchive.cpp.

◆ clearProjectFile()

bool QgsProjectArchive::clearProjectFile ( )

Remove the current .qgs project file from the temporary directory.

Returns
true if the file is well removed, false otherwise

Definition at line 161 of file qgsarchive.cpp.

◆ projectFile()

QString QgsProjectArchive::projectFile ( ) const

Returns the current .qgs project file or an empty string if there's none.

Definition at line 140 of file qgsarchive.cpp.

◆ unzip()

bool QgsProjectArchive::unzip ( const QString &  zipFilename)
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.

Parameters
zipFilenameThe zip file to unzip
Returns
true if a project file has been found, false otherwise

Reimplemented from QgsArchive.

Definition at line 153 of file qgsarchive.cpp.


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