26 #include <QStringListModel> 71 return fieldName +
" IS NULL";
73 return fieldName +
" IS NOT NULL";
83 case QVariant::Double:
84 case QVariant::LongLong:
85 case QVariant::ULongLong:
88 return fieldName +
'=' + v.toString();
90 return fieldName +
"<>" + v.toString();
97 return fieldName +
"='" + v.toString() +
'\'';
99 return fieldName +
"<>'" + v.toString() +
'\'';
119 mWidget->setEnabled( enabled );
130 if ( !value.isValid() )
151 if ( exp == nullValue )
153 str = QStringLiteral(
"%1 IS NULL" ).arg( QgsExpression::quotedColumnRef( fieldName ) );
157 str = QStringLiteral(
"%1 = '%3'" )
158 .arg( QgsExpression::quotedColumnRef( fieldName ),
159 exp.replace(
'\'', QLatin1String(
"''" ) )
185 if (
config( QStringLiteral(
"FilterFields" ), QVariant() ).isValid() )
This class is a composition of two QSettings instances:
Map canvas is a class for displaying all GIS data types on a canvas.
QgsField at(int i) const
Get field at particular index (must be in range 0..N-1)
QgsFields fields() const override
Returns the list of fields of this layer.
static QString nullRepresentation()
This string is used to represent the value NULL throughout QGIS.
QgsRelationManager relationManager
static QgsProject * instance()
Returns the QgsProject singleton instance.
Q_INVOKABLE QgsRelation relation(const QString &id) const
Get access to a relation by its id.
Represents a vector layer which manages a vector based data sets.