mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Review comments
This commit is contained in:
parent
c12fd877ed
commit
1d80fe8a19
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user