16 #ifndef QGSSEARCHWIDGETWRAPPER_H 17 #define QGSSEARCHWIDGETWRAPPER_H 32 % MappedType QList<QgsSearchWidgetWrapper::FilterFlag>
42 if ( ( l = PyList_New( sipCpp->size() ) ) == NULL )
46 QList<QgsSearchWidgetWrapper::FilterFlag>::iterator it = sipCpp->begin();
47 for (
int i = 0; it != sipCpp->end(); ++it, ++i )
51 if ( ( tobj = sipConvertFromEnum( *it, sipType_QgsSearchWidgetWrapper_FilterFlag ) ) == NULL )
56 PyList_SET_ITEM( l, i, tobj );
64 if ( sipIsErr == NULL )
65 return PyList_Check( sipPy );
67 QList<QgsSearchWidgetWrapper::FilterFlag> *qlist =
new QList<QgsSearchWidgetWrapper::FilterFlag>;
69 for (
int i = 0; i < PyList_GET_SIZE( sipPy ); ++i )
75 return sipGetState( sipTransferObj );
100 GreaterThanOrEqualTo = 1 << 5,
101 LessThanOrEqualTo = 1 << 6,
103 CaseInsensitive = 1 << 8,
105 DoesNotContain = 1 << 10,
107 IsNotBetween = 1 << 12,
109 StartsWith = 1 << 14,
119 static QList< QgsSearchWidgetWrapper::FilterFlag > exclusiveFilterFlags();
126 static QList< QgsSearchWidgetWrapper::FilterFlag > nonExclusiveFilterFlags();
149 virtual FilterFlags supportedFlags()
const;
156 virtual FilterFlags defaultFlags()
const;
167 virtual QString expression()
const = 0;
173 virtual bool applyDirectly() = 0;
183 virtual QString
createExpression( FilterFlags flags )
const { Q_UNUSED( flags );
return QStringLiteral(
"TRUE" ); }
192 QString createFieldIdentifier()
const;
200 QString aggregate()
const;
208 void setAggregate(
const QString &aggregate );
222 void setEnabled(
bool enabled )
override { Q_UNUSED( enabled ); }
230 void expressionChanged(
const QString &exp );
250 virtual void setExpression(
const QString &expression ) = 0;
256 void clearExpression();
268 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsSearchWidgetWrapper::FilterFlags )
270 #endif // QGSSEARCHWIDGETWRAPPER_H
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Q_DECLARE_METATYPE(QModelIndex)
Encapsulate a field in an attribute table or data source.
Represents a vector layer which manages a vector based data sets.