16 #ifndef QGSATTRIBUTEEDITORCONTEXT_H 17 #define QGSATTRIBUTEEDITORCONTEXT_H 62 : mParentContext( &parentContext )
63 , mVectorLayerTools( parentContext.mVectorLayerTools )
64 , mMapCanvas( parentContext.mMapCanvas )
65 , mDistanceArea( parentContext.mDistanceArea )
66 , mFormFeature( parentContext.mFormFeature )
67 , mFormMode( formMode )
73 : mParentContext( &parentContext )
74 , mVectorLayerTools( parentContext.mVectorLayerTools )
75 , mMapCanvas( parentContext.mMapCanvas )
76 , mDistanceArea( parentContext.mDistanceArea )
77 , mRelation( relation )
78 , mRelationMode( relationMode )
79 , mFormMode( widgetMode )
93 mDistanceArea = distanceArea;
219 bool mAllowCustomUi =
true;
222 #endif // QGSATTRIBUTEEDITORCONTEXT_H
const QgsVectorLayerTools * vectorLayerTools() const
Returns the associated vector layer tools.
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.
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.
QgsCoordinateTransformContext transformContext() const
Returns a copy of the project's coordinate transform context, which stores various information regard...
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.
const QgsAttributeEditorContext * parentContext() const
FormMode formMode() const
Returns the form mode.
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.
static QgsProject * instance()
Returns the QgsProject singleton instance.
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.
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.