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,
112 Q_DECLARE_FLAGS( FilterFlags, FilterFlag )
119 static QList< QgsSearchWidgetWrapper::FilterFlag > exclusiveFilterFlags();
126 static QList< QgsSearchWidgetWrapper::FilterFlag > nonExclusiveFilterFlags();
149 virtual FilterFlags supportedFlags()
const;
156 virtual FilterFlags defaultFlags()
const;
184 virtual QString
createExpression( FilterFlags flags )
const { Q_UNUSED( flags )
return QStringLiteral(
"TRUE" ); }
193 QString createFieldIdentifier()
const;
201 QString aggregate()
const;
209 void setAggregate(
const QString &aggregate );
215 int fieldIndex()
const;
229 void setEnabled(
bool enabled )
override { Q_UNUSED( enabled ) }
263 void clearExpression();
277 #endif // QGSSEARCHWIDGETWRAPPER_H