Navigation Menu

Skip to content

Commit

Permalink
Update sip binding
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jul 31, 2017
1 parent 3480390 commit a7959b7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 78 deletions.
29 changes: 0 additions & 29 deletions python/core/qgsarchive.sip
Expand Up @@ -45,13 +45,6 @@ class QgsArchive
:rtype: bool
%End

bool zip();
%Docstring
Zip the content of this archive. THe current filename is used.
:return: false if something goes wrong, true otherwise
:rtype: bool
%End

virtual bool unzip( const QString &zipFilename );
%Docstring
Clear the current content of this archive and unzip. Files are unzipped
Expand All @@ -61,16 +54,6 @@ class QgsArchive
:rtype: bool
%End

bool unzip();
%Docstring
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. The current filename
is used.
:return: true if a project file has been found, false otherwise
:rtype: bool
%End

void clear();
%Docstring
Clear the current content of this archive and create a new temporary
Expand All @@ -84,18 +67,6 @@ class QgsArchive
\param filename A file to add when zipping this archive
%End

void setFileName( const QString &filename );
%Docstring
Set the filename to use when zipping/unzipping this archive.
\param filename The zip filename
%End

QString filename() const;
%Docstring
Returns the current zip filename.
:rtype: str
%End

QStringList files() const;
%Docstring
Returns the list of files within this archive
Expand Down
50 changes: 1 addition & 49 deletions python/core/qgsproject.sip
Expand Up @@ -612,55 +612,7 @@ Returns the number of registered layers.
:rtype: QMap<str, QgsMapLayer *>
%End

bool unzip( const QString &filename );
%Docstring
Unzip a project
\param filename The zip file to unzip
:return: true if unzip is well performed, false otherwise
.. versionadded:: 3.0
:rtype: bool
%End

bool unzip();
%Docstring
Unzip a project with the current zip filename
:return: true if unzip is well performed, false otherwise
.. versionadded:: 3.0
:rtype: bool
%End

bool zip( const QString &filename );
%Docstring
Zip the project
\param filename The zip filename
:return: true if zip is well performed, false otherwise
.. versionadded:: 3.0
:rtype: bool
%End

bool zip();
%Docstring
Zip the project with the current zip filename
:return: true if zip is well performed, false otherwise
.. versionadded:: 3.0
:rtype: bool
%End

QString zipFileName() const;
%Docstring
Returns the current zip filename or an empty string if none.
.. versionadded:: 3.0
:rtype: str
%End

void setZipFileName( const QString &filename );
%Docstring
Sets the current zip filename.
\param filename The zip filename
.. versionadded:: 3.0
%End

bool unzipped() const;
bool isZipped() const;
%Docstring
Returns true if the project comes from a zip archive, false otherwise.
:rtype: bool
Expand Down
9 changes: 9 additions & 0 deletions python/core/qgsziputils.sip
Expand Up @@ -15,6 +15,15 @@
namespace QgsZipUtils
{

bool isZipFile( const QString &filename );
%Docstring
Returns true if the file name is a zipped file ( i.e with a '.qgz'
extension, false otherwise.
\param filename The name of the file
:return: true if the file is zipped, false otherwise
:rtype: bool
%End

bool unzip( const QString &zip, const QString &dir, QStringList &files /Out/ );
%Docstring
Unzip a zip file in an output directory. An error is returned if the zip
Expand Down

0 comments on commit a7959b7

Please sign in to comment.