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;
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 );
214 int fieldIndex()
const;
228 void setEnabled(
bool enabled )
override { Q_UNUSED( enabled ) }
236 void expressionChanged(
const QString &exp );
256 virtual void setExpression(
const QString &expression ) = 0;
262 void clearExpression();
274 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsSearchWidgetWrapper::FilterFlags )
276 #endif // QGSSEARCHWIDGETWRAPPER_H