22QgsProcessingFeatureSourceOptionsWidget::QgsProcessingFeatureSourceOptionsWidget( QWidget *parent )
27 mFeatureLimitSpinBox->setClearValue( 0, tr(
"Not set" ) );
28 mFeatureLimitSpinBox->clear();
30 mComboInvalidFeatureFiltering->addItem( tr(
"Use Default" ) );
40void QgsProcessingFeatureSourceOptionsWidget::setLayer(
QgsVectorLayer *layer )
42 mFilterExpressionWidget->setLayer( layer );
48 mComboInvalidFeatureFiltering->setCurrentIndex( mComboInvalidFeatureFiltering->findData( QVariant() ) );
50 mComboInvalidFeatureFiltering->setCurrentIndex( mComboInvalidFeatureFiltering->findData( QVariant::fromValue( check ) ) );
53void QgsProcessingFeatureSourceOptionsWidget::setFeatureLimit(
int limit )
55 mFeatureLimitSpinBox->setValue( limit );
58void QgsProcessingFeatureSourceOptionsWidget::setFilterExpression(
const QString &expression )
60 mFilterExpressionWidget->setExpression( expression );
65 return mComboInvalidFeatureFiltering->currentData().isValid() ? mComboInvalidFeatureFiltering->currentData().value<
Qgis::InvalidGeometryCheck >() :
Qgis::InvalidGeometryCheck::AbortOnInvalid;
68bool QgsProcessingFeatureSourceOptionsWidget::isOverridingInvalidGeometryCheck()
const
70 return mComboInvalidFeatureFiltering->currentData().isValid();
73int QgsProcessingFeatureSourceOptionsWidget::featureLimit()
const
75 return mFeatureLimitSpinBox->value() > 0 ? mFeatureLimitSpinBox->value() : -1;
78QString QgsProcessingFeatureSourceOptionsWidget::filterExpression()
const
80 return mFilterExpressionWidget->expression();
The Qgis class provides global constants for use throughout the application.
InvalidGeometryCheck
Methods for handling of features with invalid geometries.
@ NoCheck
No invalid geometry checking.
@ AbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
@ SkipInvalid
Skip any features with invalid geometry. This requires a slow geometry validity check for every featu...
void expressionChanged(const QString &expression)
Emitted when the expression is changed.
Represents a vector layer which manages a vector based data sets.