Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix doc
  • Loading branch information
troopa81 committed Aug 16, 2021
1 parent 7a7964c commit 36813e7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 11 deletions.
8 changes: 3 additions & 5 deletions python/gui/auto_generated/qgsexternalstoragefilewidget.sip.in
Expand Up @@ -164,11 +164,9 @@ It defines the variable containing the user selected file name


void addFileWidgetScope();

void storeExternalFiles( QStringList fileNames, QStringList storedUrls = QStringList() );



%Docstring
Add file widget specific scope to expression context
%End

};

Expand Down
12 changes: 12 additions & 0 deletions python/gui/auto_generated/qgsfilewidget.sip.in
Expand Up @@ -264,12 +264,24 @@ Emitted whenever the current file or directory ``path`` is changed.
protected:

virtual void updateLayout();
%Docstring
Update buttons visibility
%End

virtual void setSelectedFileNames( QStringList fileNames );
%Docstring
Called whenever user select ``fileNames`` from dialog
%End

static bool isMultiFiles( const QString &path );
%Docstring
Returns true if ``path`` is a multifiles
%End

void setFilePaths( const QStringList &filePaths );
%Docstring
Update filePath according to ``filePaths`` list
%End



Expand Down
8 changes: 6 additions & 2 deletions src/gui/qgsexternalstoragefilewidget.h
Expand Up @@ -34,7 +34,7 @@ class QgsMessageBar;
* \ingroup gui
* \brief The QgsExternalStorageFileWidget class creates a widget for selecting a file or a folder
* and stores it to a given external storage backend if defined
* \since 3.22
* \since QGIS 3.22
*/
class GUI_EXPORT QgsExternalStorageFileWidget : public QgsFileWidget
{
Expand Down Expand Up @@ -165,9 +165,13 @@ class GUI_EXPORT QgsExternalStorageFileWidget : public QgsFileWidget

void setSelectedFileNames( QStringList fileNames ) override;

// add file widget specific scope to expression context
/**
* Add file widget specific scope to expression context
*/
void addFileWidgetScope();

private:

// stores \a fileNames files using current external storage.
// This is a recursive method, \a storedUrls contains urls for previously stored
// fileNames. When all files have been successfully stored, current mFilePath
Expand Down
16 changes: 12 additions & 4 deletions src/gui/qgsfilewidget.h
Expand Up @@ -301,16 +301,24 @@ class GUI_EXPORT QgsFileWidget : public QWidget

protected:

// update buttons visibility
/**
* Update buttons visibility
*/
virtual void updateLayout();

// called whenever user select file names from dialog
/**
* Called whenever user select \a fileNames from dialog
*/
virtual void setSelectedFileNames( QStringList fileNames );

// Returns true if \a path is a multifiles
/**
* Returns true if \a path is a multifiles
*/
static bool isMultiFiles( const QString &path );

// Update filePath according to a file path list
/**
* Update filePath according to \a filePaths list
*/
void setFilePaths( const QStringList &filePaths );

QString mFilePath;
Expand Down

0 comments on commit 36813e7

Please sign in to comment.