17#include "moc_qgscheckboxsearchwidgetwrapper.cpp"
47 v = mCheckBox->isChecked() ?
config( QStringLiteral(
"CheckedState" ),
true ) :
config( QStringLiteral(
"UncheckedState" ),
false );
70 return fieldName +
" IS NULL";
73 return fieldName +
" IS NOT NULL";
75 const QVariant v =
value();
81 case QMetaType::Type::Int:
82 case QMetaType::Type::UInt:
83 case QMetaType::Type::Double:
84 case QMetaType::Type::LongLong:
85 case QMetaType::Type::ULongLong:
86 case QMetaType::Type::Bool:
89 return fieldName +
'=' + v.toString();
91 return fieldName +
"<>" + v.toString();
98 return fieldName +
"='" + v.toString() +
'\'';
100 return fieldName +
"<>'" + v.toString() +
'\'';
112 whileBlocking( mCheckBox )->setCheckState( Qt::PartiallyChecked );
120 mCheckBox->setEnabled( enabled );
134 const QString
str = QStringLiteral(
"%1 = '%3'" )
136 exp.replace(
'\'', QLatin1String(
"''" ) )
141void QgsCheckboxSearchWidgetWrapper::stateChanged(
int )
145 mCheckBox->setTristate(
false );
146 const QString exp =
value().toString();
155 QCheckBox *
c =
new QCheckBox( parent );
156 c->setChecked( Qt::PartiallyChecked );
162 mCheckBox = qobject_cast<QCheckBox *>( editor );
166 mCheckBox->setChecked( Qt::PartiallyChecked );
167 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.