QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
29 if (
field().type() == QVariant::Bool )
32 v = mGroupBox->isChecked();
34 v = mCheckBox->isChecked();
39 v = mGroupBox->isChecked() ?
config( QStringLiteral(
"CheckedState" ) ) :
config( QStringLiteral(
"UncheckedState" ) );
42 v = mCheckBox->isChecked() ?
config( QStringLiteral(
"CheckedState" ) ) :
config( QStringLiteral(
"UncheckedState" ) );
52 whileBlocking( mCheckBox )->setCheckState( Qt::PartiallyChecked );
58 return new QCheckBox( parent );
63 mCheckBox = qobject_cast<QCheckBox *>( editor );
64 mGroupBox = qobject_cast<QGroupBox *>( editor );
67 connect( mCheckBox, &QAbstractButton::toggled,
this, [ = ](
bool state )
75 connect( mGroupBox, &QGroupBox::toggled,
this, [ = ](
bool state )
86 return mCheckBox || mGroupBox;
89 void QgsCheckboxWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
93 if (
field().type() == QVariant::Bool )
95 state =
value.toBool();
99 state = (
value ==
config( QStringLiteral(
"CheckedState" ) ) );
103 mGroupBox->setChecked( state );
108 mCheckBox->setChecked( state );
#define Q_NOWARN_DEPRECATED_POP
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
Represents a vector layer which manages a vector based data sets.
#define Q_NOWARN_DEPRECATED_PUSH