26 if ( vl->
fields().
at( fieldIdx ).
type() == QVariant::Bool )
28 leCheckedState->setEnabled(
false );
29 leUncheckedState->setEnabled(
false );
31 leCheckedState->setPlaceholderText( QStringLiteral(
"TRUE" ) );
32 leUncheckedState->setPlaceholderText( QStringLiteral(
"FALSE" ) );
40 cfg.insert( QStringLiteral(
"CheckedState" ), leCheckedState->text() );
41 cfg.insert( QStringLiteral(
"UncheckedState" ), leUncheckedState->text() );
48 if (
layer()->fields().at(
field() ).type() != QVariant::Bool )
50 leCheckedState->setText( config.value( QStringLiteral(
"CheckedState" ) ).toString() );
51 leUncheckedState->setText( config.value( QStringLiteral(
"UncheckedState" ) ).toString() );
QgsCheckBoxConfigDlg(QgsVectorLayer *vl, int fieldIdx, QWidget *parent=nullptr)
QgsField at(int i) const
Get field at particular index (must be in range 0..N-1)
QgsFields fields() const override
Returns the list of fields of this layer.
QVariantMap config() override
Create a configuration from the current GUI state.
void setConfig(const QVariantMap &config) override
Update the configuration widget to represent the given configuration.
Represents a vector layer which manages a vector based data sets.