26 return QStringLiteral(
"CheckBox" );
47 bool isNull = value.isNull();
48 bool boolValue =
false;
51 const QVariant::Type fieldType = layer->
fields().
at( fieldIndex ).
type();
52 if ( fieldType == QVariant::Bool )
54 boolValue = value.toBool();
58 if ( !value.canConvert<QString>() )
61 textValue = QObject::tr(
"(invalid)" );
65 if ( config.contains( QStringLiteral(
"CheckedState" ) ) && value.toString() == config[ QStringLiteral(
"CheckedState" ) ].toString() )
69 else if ( config.contains( QStringLiteral(
"UncheckedState" ) ) && value.toString() == config[ QStringLiteral(
"UncheckedState" ) ].toString() )
76 textValue = QStringLiteral(
"(%1)" ).arg( value.toString() );
86 return QObject::tr(
"true" );
88 return QObject::tr(
"false" );