QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
A reusable widget which displays a summary of the results from a QgsAbstractValidityCheck (or checks). More...
#include <qgsvaliditycheckresultswidget.h>
Public Member Functions | |
QgsValidityCheckResultsWidget (QWidget *parent) | |
Constructor for QgsValidityCheckResultsWidget, with the specified parent widget. More... | |
void | setDescription (const QString &description) |
Sets a description label to show at the top of the widget, e.g. More... | |
void | setResults (const QList< QgsValidityCheckResult > &results) |
Sets the list of check results to show in the dialog. More... | |
Static Public Member Functions | |
static bool | runChecks (int type, const QgsValidityCheckContext *context, const QString &title, const QString &description, QWidget *parent=nullptr) |
Runs all registered validity checks of the given type, and if any warnings or critical errors are encountered then displays them to users in a dialog. More... | |
A reusable widget which displays a summary of the results from a QgsAbstractValidityCheck (or checks).
Definition at line 70 of file qgsvaliditycheckresultswidget.h.
QgsValidityCheckResultsWidget::QgsValidityCheckResultsWidget | ( | QWidget * | parent | ) |
Constructor for QgsValidityCheckResultsWidget, with the specified parent widget.
Definition at line 96 of file qgsvaliditycheckresultswidget.cpp.
|
static |
Runs all registered validity checks of the given type, and if any warnings or critical errors are encountered then displays them to users in a dialog.
The context argument must specify the correct QgsValidityCheckContext subclass for the given check type.
The title argument is used as the dialog's title, and the description text will be shown to users as an explanation of why the checks are being run.
The parent argument can be used to give a parent widget for the created dialogs.
If any critical errors are encountered by the checks, then users will not be allowed to click OK on the dialog and proceed with the operation. The function will return false
.
Returns true
if no warnings were encountered (and no dialog was shown to users), or if only warnings were shown and the user clicked OK after being shown these warnings.
This method is a blocking method, and runs all checks in the main thread.
Definition at line 130 of file qgsvaliditycheckresultswidget.cpp.
void QgsValidityCheckResultsWidget::setDescription | ( | const QString & | description | ) |
Sets a description label to show at the top of the widget, e.g.
notifying users of why they are being shown the warnings.
Definition at line 124 of file qgsvaliditycheckresultswidget.cpp.
void QgsValidityCheckResultsWidget::setResults | ( | const QList< QgsValidityCheckResult > & | results | ) |
Sets the list of check results to show in the dialog.
Definition at line 103 of file qgsvaliditycheckresultswidget.cpp.