16 #ifndef QGSATTRIBUTEEDITORCONTEXT_H 17 #define QGSATTRIBUTEEDITORCONTEXT_H 79 : mParentContext( &parentContext )
80 , mVectorLayerTools( parentContext.mVectorLayerTools )
81 , mMapCanvas( parentContext.mMapCanvas )
82 , mDistanceArea( parentContext.mDistanceArea )
83 , mFormFeature( parentContext.mFormFeature )
84 , mFormMode( formMode )
90 : mParentContext( &parentContext )
91 , mVectorLayerTools( parentContext.mVectorLayerTools )
92 , mMapCanvas( parentContext.mMapCanvas )
93 , mDistanceArea( parentContext.mDistanceArea )
94 , mRelation( relation )
95 , mRelationMode( relationMode )
96 , mFormMode( widgetMode )
110 mDistanceArea = distanceArea;
258 const QMetaEnum metaEnum( QMetaEnum::fromType<Mode>() );
259 return metaEnum.valueToKey( static_cast<int>( mAttributeFormMode ) );
274 bool mAllowCustomUi =
true;
275 Mode mAttributeFormMode = SingleEditMode;
278 #endif // QGSATTRIBUTEEDITORCONTEXT_H
const QgsVectorLayerTools * vectorLayerTools() const
Returns the associated vector layer tools.
void setAttributeFormMode(const Mode &attributeFormMode)
Set attributeFormMode for the edited form.
Form is in aggregate search mode, show each widget in this mode.
A form was opened as a new dialog.
This class contains context information for attribute editor widgets.
QgsAttributeEditorContext(const QgsAttributeEditorContext &parentContext, FormMode formMode)
void setMapCanvas(QgsMapCanvas *mapCanvas)
Sets the associated map canvas, mapCanvas, (e.g.
When showing a list of features (e.g. houses as an embedded form in a district form) ...
QgsAttributeEditorContext(const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode widgetMode)
void setVectorLayerTools(QgsVectorLayerTools *vlTools)
Sets the associated vector layer tools.
Multi edit mode, for editing fields of multiple features at once.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setAllowCustomUi(bool allow)
Sets whether the attribute editor should permit use of custom UI forms.
Map canvas is a class for displaying all GIS data types on a canvas.
void setFormFeature(const QgsFeature &feature)
Set current feature for the currently edited form or table row.
This context is not defined by a relation.
RelationMode
Determines in which direction a relation was resolved.
const QgsRelation & relation() const
Returns the attribute relation.
void setDistanceArea(const QgsDistanceArea &distanceArea)
Sets distance area object, distanceArea, for area/length calculations.
QgsFeature formFeature() const
Returns current feature from the currently edited form or table row.
QgsAdvancedDigitizingDockWidget * cadDockWidget() const
Returns the associated CAD dock widget (e.g.
Mode attributeFormMode() const
Returns current attributeFormMode.
const QgsAttributeEditorContext * parentContext() const
FormMode formMode() const
Returns the form mode.
QgsCoordinateTransformContext transformContext
A general purpose distance and area calculator, capable of performing ellipsoid based calculations...
void setFormMode(FormMode mode)
Sets the form mode.
bool allowCustomUi() const
Returns true if the attribute editor should permit use of custom UI forms.
Single edit mode, for editing a single feature.
static QgsProject * instance()
Returns the QgsProject singleton instance.
QString attributeFormModeString() const
Returns given attributeFormMode as string.
const QgsDistanceArea & distanceArea() const
Returns the distance area object used for area/length calculations.
void setSourceCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets source spatial reference system crs.
RelationMode relationMode() const
Returns the attribute relation mode.
Form values are used for searching/filtering the layer.
Represents a vector layer which manages a vector based data sets.
void setRelation(const QgsRelation &relation, RelationMode mode)
Set attribute relation and mode.
QgsMapCanvas * mapCanvas() const
Returns the associated map canvas (e.g.
A form was embedded as a widget on another form.