24 , mMessageBar( messageBar )
42 QMap<QString, QVariant> cfg;
44 cfg.insert(
"AllowNULL", configElement.attribute(
"AllowNULL" ) ==
"1" );
45 cfg.insert(
"OrderByValue", configElement.attribute(
"OrderByValue" ) ==
"1" );
46 cfg.insert(
"ShowForm", configElement.attribute(
"ShowForm" ) ==
"1" );
47 cfg.insert(
"Relation", configElement.attribute(
"Relation" ) );
48 cfg.insert(
"MapIdentification", configElement.attribute(
"MapIdentification" ) ==
"1" );
49 cfg.insert(
"ReadOnly", configElement.attribute(
"ReadOnly" ) ==
"1" );
60 configElement.setAttribute(
"AllowNULL", config[
"AllowNULL"].toBool() );
61 configElement.setAttribute(
"OrderByValue", config[
"OrderByValue"].toBool() );
62 configElement.setAttribute(
"ShowForm", config[
"ShowForm"].toBool() );
63 configElement.setAttribute(
"Relation", config[
"Relation"].toString() );
64 configElement.setAttribute(
"MapIdentification", config[
"MapIdentification"].toBool() );
65 configElement.setAttribute(
"ReadOnly", config[
"ReadOnly"].toBool() );
virtual QgsEditorConfigWidget * configWidget(QgsVectorLayer *vl, int fieldIdx, QWidget *parent) const override
Override this in your implementation.
A bar for displaying non-blocking messages to the user.
virtual void writeConfig(const QgsEditorWidgetConfig &config, QDomElement &configElement, QDomDocument &doc, const QgsVectorLayer *layer, int fieldIdx) override
Serialize your configuration and save it in a xml doc.
Map canvas is a class for displaying all GIS data types on a canvas.
virtual QgsEditorWidgetConfig readConfig(const QDomElement &configElement, QgsVectorLayer *layer, int fieldIdx) override
Read the config from an XML file and map it to a proper QgsEditorWidgetConfig.
QgsRelationReferenceFactory(QString name, QgsMapCanvas *canvas, QgsMessageBar *messageBar)
Represents a vector layer which manages a vector based data sets.
virtual QgsEditorWidgetWrapper * create(QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QWidget *parent) const override
Override this in your implementation.