Skip to content
Permalink
Browse files

Review comments

  • Loading branch information
nyalldawson committed Apr 30, 2019
1 parent c12fd87 commit 1d80fe8a19e7e2b0117d3eebacd1e974ba5eed95
@@ -30,17 +30,21 @@ Constructor for QgsFindFilesByPatternWidget, with the specified ``parent`` widge

QStringList files() const;
%Docstring
Returns the list of files found by the dialog.
Returns the list of files found by the dialog. This may be empty if
no matching files were found.

.. seealso:: :py:func:`filesFound`
.. seealso:: :py:func:`findComplete`
%End

signals:

void filesFound( const QStringList &files );
void findComplete( const QStringList &files );
%Docstring
Emitted after files are found in the dialog.

The ``files`` argument contains a list of all matching files found. This may be empty if
no matching files were found.

.. seealso:: :py:func:`files`
%End

@@ -66,7 +70,8 @@ Constructor for QgsFindFilesByPatternDialog, with the specified ``parent`` widge

QStringList files() const;
%Docstring
Returns the list of files found by the dialog.
Returns the list of files found by the dialog. This may be empty if
no matching files were found.
%End

};
@@ -96,7 +96,7 @@ class BatchPanelFillWidget(QToolButton):
def __init__(self, parameterDefinition, column, panel, parent=None):
super().__init__(parent)

self.setBackgroundRole(QPalette.Window)
self.setBackgroundRole(QPalette.Button)
self.setAutoFillBackground(True)

self.parameterDefinition = parameterDefinition
@@ -103,7 +103,7 @@ void QgsFindFilesByPatternWidget::find()
disconnect( mFindButton, &QPushButton::clicked, this, &QgsFindFilesByPatternWidget::cancel );
connect( mFindButton, &QPushButton::clicked, this, &QgsFindFilesByPatternWidget::find );

emit filesFound( mFiles );
emit findComplete( mFiles );
}

void QgsFindFilesByPatternWidget::cancel()
@@ -135,7 +135,7 @@ QgsFindFilesByPatternDialog::QgsFindFilesByPatternDialog( QWidget *parent )
setLayout( vLayout );

mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
connect( mWidget, &QgsFindFilesByPatternWidget::filesFound, this, [ = ]( const QStringList & files )
connect( mWidget, &QgsFindFilesByPatternWidget::findComplete, this, [ = ]( const QStringList & files )
{
mButtonBox->button( QDialogButtonBox::Ok )->setEnabled( !files.empty() );
} );
@@ -41,8 +41,9 @@ class GUI_EXPORT QgsFindFilesByPatternWidget : public QWidget, private Ui::QgsFi
QgsFindFilesByPatternWidget( QWidget *parent SIP_TRANSFERTHIS = nullptr );

/**
* Returns the list of files found by the dialog.
* \see filesFound()
* Returns the list of files found by the dialog. This may be empty if
* no matching files were found.
* \see findComplete()
*/
QStringList files() const { return mFiles; }

@@ -51,9 +52,12 @@ class GUI_EXPORT QgsFindFilesByPatternWidget : public QWidget, private Ui::QgsFi
/**
* Emitted after files are found in the dialog.
*
* The \a files argument contains a list of all matching files found. This may be empty if
* no matching files were found.
*
* \see files()
*/
void filesFound( const QStringList &files );
void findComplete( const QStringList &files );

private slots:

@@ -84,7 +88,8 @@ class GUI_EXPORT QgsFindFilesByPatternDialog : public QDialog
QgsFindFilesByPatternDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr );

/**
* Returns the list of files found by the dialog.
* Returns the list of files found by the dialog. This may be empty if
* no matching files were found.
*/
QStringList files() const;

0 comments on commit 1d80fe8

Please sign in to comment.
You can’t perform that action at this time.