17#include "moc_qgsjsoneditwrapper.cpp"
28 if ( !mJsonEditWidget )
31 return mJsonEditWidget->property( RAW_VALUE_PROPERTY.toUtf8().data() );
39 return jsonEditWidget;
44 mJsonEditWidget = qobject_cast<QgsJsonEditWidget *>( editor );
45 if ( !mJsonEditWidget )
53 return ( mJsonEditWidget );
58 if ( !mJsonEditWidget )
61 mJsonEditWidget->blockSignals(
true );
62 mJsonEditWidget->
setJsonText( QStringLiteral(
"<mixed values>" ) );
63 mJsonEditWidget->blockSignals(
false );
72void QgsJsonEditWrapper::updateValues(
const QVariant &value,
const QVariantList & )
74 if ( !mJsonEditWidget )
77 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...
Q_INVOKABLE 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.