17#include "moc_qgscheckboxsearchwidgetwrapper.cpp"
50 if ( fieldType == QMetaType::Type::Bool )
52 v = mCheckBox->isChecked();
56 v = mCheckBox->isChecked() ?
config( QStringLiteral(
"CheckedState" ),
true ) :
config( QStringLiteral(
"UncheckedState" ),
false );
81 return fieldName +
" IS NULL";
84 return fieldName +
" IS NOT NULL";
86 const QVariant v =
value();
92 case QMetaType::Type::Int:
93 case QMetaType::Type::UInt:
94 case QMetaType::Type::Double:
95 case QMetaType::Type::LongLong:
96 case QMetaType::Type::ULongLong:
97 case QMetaType::Type::Bool:
100 return fieldName +
'=' + v.toString();
102 return fieldName +
"<>" + v.toString();
109 return fieldName +
"='" + v.toString() +
'\'';
111 return fieldName +
"<>'" + v.toString() +
'\'';
123 whileBlocking( mCheckBox )->setCheckState( Qt::PartiallyChecked );
131 mCheckBox->setEnabled( enabled );
145 const QString str = QStringLiteral(
"%1 = '%3'" )
150void QgsCheckboxSearchWidgetWrapper::stateChanged(
int )
154 mCheckBox->setTristate(
false );
155 const QString exp =
value().toString();
164 QCheckBox *
c =
new QCheckBox( parent );
165 c->setChecked( Qt::PartiallyChecked );
171 mCheckBox = qobject_cast<QCheckBox *>( editor );
175 mCheckBox->setChecked( Qt::PartiallyChecked );
176 connect( mCheckBox, &QCheckBox::stateChanged,
this, &QgsCheckboxSearchWidgetWrapper::stateChanged );
static QString quotedColumnRef(QString name)
Returns a quoted column reference (in double quotes)
QgsField at(int i) const
Returns the field at particular index (must be in range 0..N-1).
Represents a vector layer which manages a vector based data sets.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.