18#include "moc_qgsprocessingfeaturesourceoptionswidget.cpp"
23QgsProcessingFeatureSourceOptionsWidget::QgsProcessingFeatureSourceOptionsWidget( QWidget *parent )
28 mFeatureLimitSpinBox->setClearValue( 0, tr(
"Not set" ) );
29 mFeatureLimitSpinBox->clear();
31 mComboInvalidFeatureFiltering->addItem( tr(
"Use Default" ) );
41void QgsProcessingFeatureSourceOptionsWidget::setLayer(
QgsVectorLayer *layer )
43 mFilterExpressionWidget->setLayer( layer );
49 mComboInvalidFeatureFiltering->setCurrentIndex( mComboInvalidFeatureFiltering->findData( QVariant() ) );
51 mComboInvalidFeatureFiltering->setCurrentIndex( mComboInvalidFeatureFiltering->findData( QVariant::fromValue( check ) ) );
54void QgsProcessingFeatureSourceOptionsWidget::setFeatureLimit(
int limit )
56 mFeatureLimitSpinBox->setValue( limit );
59void QgsProcessingFeatureSourceOptionsWidget::setFilterExpression(
const QString &expression )
61 mFilterExpressionWidget->setExpression( expression );
66 return mComboInvalidFeatureFiltering->currentData().isValid() ? mComboInvalidFeatureFiltering->currentData().value<
Qgis::InvalidGeometryCheck >() :
Qgis::InvalidGeometryCheck::AbortOnInvalid;
69bool QgsProcessingFeatureSourceOptionsWidget::isOverridingInvalidGeometryCheck()
const
71 return mComboInvalidFeatureFiltering->currentData().isValid();
74int QgsProcessingFeatureSourceOptionsWidget::featureLimit()
const
76 return mFeatureLimitSpinBox->value() > 0 ? mFeatureLimitSpinBox->value() : -1;
79QString QgsProcessingFeatureSourceOptionsWidget::filterExpression()
const
81 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.