27 if ( !mJsonEditWidget )
30 return mJsonEditWidget->property( RAW_VALUE_PROPERTY.toUtf8().data() );
38 return jsonEditWidget;
43 mJsonEditWidget = qobject_cast<QgsJsonEditWidget *>( editor );
44 if ( !mJsonEditWidget )
52 return ( mJsonEditWidget );
57 if ( !mJsonEditWidget )
60 mJsonEditWidget->blockSignals(
true );
61 mJsonEditWidget->
setJsonText( QStringLiteral(
"<mixed values>" ) );
62 mJsonEditWidget->blockSignals(
false );
71void QgsJsonEditWrapper::updateValues(
const QVariant &value,
const QVariantList & )
73 if ( !mJsonEditWidget )
76 mJsonEditWidget->setProperty( RAW_VALUE_PROPERTY.toUtf8().data(),
value );
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QVariant attribute(const QString &name) const
Lookup attribute value by attribute name.
QWidget * createWidget(QWidget *parent) override
This method should create a new widget with the provided parent.
QVariant value() const override
Will be used to access the widget's value.
bool valid() const override
Returns true if the widget has been properly initialized.
QgsJsonEditWrapper(QgsVectorLayer *layer, int fieldIdx, QWidget *editor=nullptr, QWidget *parent=nullptr)
Constructor for QgsJsonEditWrapper.
void setEnabled(bool enabled) override
void initWidget(QWidget *editor) override
This method should initialize the editor widget with runtime data.
void showIndeterminateState() override
Sets the widget to display in an indeterminate "mixed value" state.
void setFeature(const QgsFeature &feature) override
Represents a vector layer which manages a vector based data sets.