31 , mMessageBar( messageBar )
52 QHash<const char *, int> map = QHash<const char *, int>();
53 map.insert( QgsRelationReferenceWidget::staticMetaObject.className(), 10 );
59 int normalRelationsCount = 0;
64 normalRelationsCount++;
67 return normalRelationsCount > 0 ? 21 : 5;
Map canvas is a class for displaying all GIS data types on a canvas.
A bar for displaying non-blocking messages to the user.
QgsEditorConfigWidget * configWidget(QgsVectorLayer *vl, int fieldIdx, QWidget *parent) const override
Override this in your implementation.
QgsRelationReferenceFactory(const QString &name, QgsMapCanvas *canvas, QgsMessageBar *messageBar)
QgsEditorWidgetWrapper * create(QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QWidget *parent) const override
Override this in your implementation.
QgsSearchWidgetWrapper * createSearchWidget(QgsVectorLayer *vl, int fieldIdx, QWidget *parent) const override
By default a simple QgsFilterLineEdit is returned as search widget.
unsigned int fieldScore(const QgsVectorLayer *vl, int fieldIdx) const override
This method allows disabling this editor widget type for a certain field.
QHash< const char *, int > supportedWidgetTypes() override
Returns a list of widget types which this editor widget supports.
@ Normal
A normal relation.
Represents a vector layer which manages a vector based data sets.
QList< QgsRelation > referencingRelations(int idx) const
Returns the layer's relations, where the foreign key is on this layer.