QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
This class contains context information for attribute editor widgets. More...
#include <qgsattributeeditorcontext.h>
Public Types | |
enum | FormMode { Embed , StandaloneDialog , Popup } |
enum | Mode { SingleEditMode , AddFeatureMode , FixAttributeMode , MultiEditMode , SearchMode , AggregateSearchMode , IdentifyMode } |
modes More... | |
enum | RelationMode { Undefined , Multiple , Single } |
Determines in which direction a relation was resolved. More... | |
Public Member Functions | |
QgsAttributeEditorContext ()=default | |
QgsAttributeEditorContext (const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode widgetMode) | |
QgsAttributeEditorContext (const QgsAttributeEditorContext &parentContext, FormMode formMode) | |
bool | allowCustomUi () const |
Returns true if the attribute editor should permit use of custom UI forms. | |
Mode | attributeFormMode () const |
Returns current attributeFormMode. | |
QString | attributeFormModeString () const |
Returns given attributeFormMode as string. | |
QgsAdvancedDigitizingDockWidget * | cadDockWidget () const |
Returns the associated CAD dock widget (e.g. | |
const QgsDistanceArea & | distanceArea () const |
Returns the distance area object used for area/length calculations. | |
QgsFeature | formFeature () const |
Returns current feature from the currently edited form or table row. | |
FormMode | formMode () const |
Returns the form mode. | |
QgsMessageBar * | mainMessageBar () |
Returns the main message bar. | |
QgsMapCanvas * | mapCanvas () const |
Returns the associated map canvas (e.g. | |
const QgsAttributeEditorContext * | parentContext () const |
QgsFeature | parentFormFeature () const |
Returns the feature of the currently edited parent form in its actual state. | |
const QgsRelation & | relation () const |
Returns the attribute relation. | |
RelationMode | relationMode () const |
Returns the attribute relation mode. | |
void | setAllowCustomUi (bool allow) |
Sets whether the attribute editor should permit use of custom UI forms. | |
void | setAttributeFormMode (const Mode &attributeFormMode) |
Set attributeFormMode for the edited form. | |
void | setCadDockWidget (QgsAdvancedDigitizingDockWidget *cadDockWidget) |
Sets the associated CAD dock widget, cadDockWidget, (e.g. | |
void | setDistanceArea (const QgsDistanceArea &distanceArea) |
Sets distance area object, distanceArea, for area/length calculations. | |
void | setFormFeature (const QgsFeature &feature) |
Set current feature for the currently edited form or table row. | |
void | setFormMode (FormMode mode) |
Sets the form mode. | |
void | setMainMessageBar (QgsMessageBar *messageBar) |
Set current messageBar as the main message bar. | |
void | setMapCanvas (QgsMapCanvas *mapCanvas) |
Sets the associated map canvas, mapCanvas, (e.g. | |
void | setParentFormFeature (const QgsFeature &feature) |
Sets the feature of the currently edited parent form. | |
void | setRelation (const QgsRelation &relation, RelationMode mode) |
Set attribute relation and mode. | |
void | setVectorLayerTools (QgsVectorLayerTools *vlTools) |
Sets the associated vector layer tools. | |
const QgsVectorLayerTools * | vectorLayerTools () const |
Returns the associated vector layer tools. | |
This class contains context information for attribute editor widgets.
It will be passed to embedded widgets whenever this occurs (e.g. when showing an embedded form due to relations)
Definition at line 40 of file qgsattributeeditorcontext.h.
Enumerator | |
---|---|
Embed | A form was embedded as a widget on another form. |
StandaloneDialog | A form was opened as a new dialog. |
Popup | A widget was opened as a popup (e.g. attribute table editor widget) |
Definition at line 69 of file qgsattributeeditorcontext.h.
modes
Definition at line 46 of file qgsattributeeditorcontext.h.
Determines in which direction a relation was resolved.
Definition at line 62 of file qgsattributeeditorcontext.h.
|
default |
|
inline |
Definition at line 78 of file qgsattributeeditorcontext.h.
|
inline |
Definition at line 91 of file qgsattributeeditorcontext.h.
|
inline |
Returns true
if the attribute editor should permit use of custom UI forms.
Definition at line 212 of file qgsattributeeditorcontext.h.
|
inline |
Returns current attributeFormMode.
Definition at line 256 of file qgsattributeeditorcontext.h.
|
inline |
Returns given attributeFormMode as string.
Definition at line 268 of file qgsattributeeditorcontext.h.
|
inline |
Returns the associated CAD dock widget (e.g.
to be used in map tools).
Definition at line 152 of file qgsattributeeditorcontext.h.
|
inline |
Returns the distance area object used for area/length calculations.
Definition at line 122 of file qgsattributeeditorcontext.h.
|
inline |
Returns current feature from the currently edited form or table row.
Definition at line 229 of file qgsattributeeditorcontext.h.
|
inline |
Returns the form mode.
Definition at line 199 of file qgsattributeeditorcontext.h.
|
inline |
Returns the main message bar.
Definition at line 284 of file qgsattributeeditorcontext.h.
|
inline |
Returns the associated map canvas (e.g.
to zoom to related features).
Definition at line 136 of file qgsattributeeditorcontext.h.
|
inline |
Definition at line 222 of file qgsattributeeditorcontext.h.
|
inline |
Returns the feature of the currently edited parent form in its actual state.
Definition at line 243 of file qgsattributeeditorcontext.h.
|
inline |
Returns the attribute relation.
Definition at line 186 of file qgsattributeeditorcontext.h.
|
inline |
Returns the attribute relation mode.
Definition at line 193 of file qgsattributeeditorcontext.h.
|
inline |
Sets whether the attribute editor should permit use of custom UI forms.
allow | set to true to allow custom UI forms, or false to disable them and use default generated QGIS forms |
Definition at line 220 of file qgsattributeeditorcontext.h.
|
inline |
Set attributeFormMode for the edited form.
Definition at line 262 of file qgsattributeeditorcontext.h.
void QgsAttributeEditorContext::setCadDockWidget | ( | QgsAdvancedDigitizingDockWidget * | cadDockWidget | ) |
Sets the associated CAD dock widget, cadDockWidget, (e.g.
to be used in map tools).
Definition at line 19 of file qgsattributeeditorcontext.cpp.
|
inline |
Sets distance area object, distanceArea, for area/length calculations.
Definition at line 109 of file qgsattributeeditorcontext.h.
|
inline |
Set current feature for the currently edited form or table row.
Definition at line 236 of file qgsattributeeditorcontext.h.
|
inline |
Sets the form mode.
mode | form mode |
Definition at line 206 of file qgsattributeeditorcontext.h.
|
inline |
Set current messageBar as the main message bar.
Definition at line 278 of file qgsattributeeditorcontext.h.
|
inline |
Sets the associated map canvas, mapCanvas, (e.g.
to zoom to related features).
Definition at line 129 of file qgsattributeeditorcontext.h.
|
inline |
Sets the feature of the currently edited parent form.
Definition at line 250 of file qgsattributeeditorcontext.h.
|
inline |
Set attribute relation and mode.
relation | relation |
mode | relation mode |
Definition at line 175 of file qgsattributeeditorcontext.h.
|
inline |
Sets the associated vector layer tools.
vlTools | vector layer tools |
Definition at line 159 of file qgsattributeeditorcontext.h.
|
inline |
Returns the associated vector layer tools.
Definition at line 166 of file qgsattributeeditorcontext.h.