QGIS API Documentation  3.0.2-Girona (307d082)
Public Types | Public Member Functions | List of all members
QgsAttributeEditorContext Class Reference

This class contains context information for attribute editor widgets. More...

#include <qgsattributeeditorcontext.h>

Public Types

enum  FormMode { Embed, StandaloneDialog, Popup }
 
enum  RelationMode { Undefined, Multiple, Single }
 Determines in which direction a relation was resolved. More...
 

Public Member Functions

 QgsAttributeEditorContext ()=default
 Constructor for QgsAttributeEditorContext. More...
 
 QgsAttributeEditorContext (const QgsAttributeEditorContext &parentContext, FormMode formMode)
 
 QgsAttributeEditorContext (const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode widgetMode)
 
bool allowCustomUi () const
 Returns true if the attribute editor should permit use of custom UI forms. More...
 
const QgsDistanceAreadistanceArea () const
 
FormMode formMode () const
 Returns the form mode. More...
 
const QgsAttributeEditorContextparentContext () const
 
const QgsRelationrelation () const
 
RelationMode relationMode () const
 
void setAllowCustomUi (bool allow)
 Sets whether the attribute editor should permit use of custom UI forms. More...
 
void setDistanceArea (const QgsDistanceArea &distanceArea)
 
void setFormMode (FormMode mode)
 Sets the form mode. More...
 
void setRelation (const QgsRelation &relation, RelationMode mode)
 
void setVectorLayerTools (QgsVectorLayerTools *vlTools)
 
const QgsVectorLayerToolsvectorLayerTools () const
 

Detailed Description

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 35 of file qgsattributeeditorcontext.h.

Member Enumeration Documentation

◆ FormMode

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 49 of file qgsattributeeditorcontext.h.

◆ RelationMode

Determines in which direction a relation was resolved.

Enumerator
Undefined 

This context is not defined by a relation.

Multiple 

When showing a list of features (e.g. houses as an embedded form in a district form)

Single 

When showing a single feature (e.g. district information when looking at the form of a house)

Definition at line 42 of file qgsattributeeditorcontext.h.

Constructor & Destructor Documentation

◆ QgsAttributeEditorContext() [1/3]

QgsAttributeEditorContext::QgsAttributeEditorContext ( )
default

Constructor for QgsAttributeEditorContext.

◆ QgsAttributeEditorContext() [2/3]

QgsAttributeEditorContext::QgsAttributeEditorContext ( const QgsAttributeEditorContext parentContext,
FormMode  formMode 
)
inline

Definition at line 59 of file qgsattributeeditorcontext.h.

◆ QgsAttributeEditorContext() [3/3]

QgsAttributeEditorContext::QgsAttributeEditorContext ( const QgsAttributeEditorContext parentContext,
const QgsRelation relation,
RelationMode  relationMode,
FormMode  widgetMode 
)
inline

Definition at line 68 of file qgsattributeeditorcontext.h.

Member Function Documentation

◆ allowCustomUi()

bool QgsAttributeEditorContext::allowCustomUi ( ) const
inline

Returns true if the attribute editor should permit use of custom UI forms.

See also
setAllowCustomUi()
Since
QGIS 2.16

Definition at line 116 of file qgsattributeeditorcontext.h.

◆ distanceArea()

const QgsDistanceArea& QgsAttributeEditorContext::distanceArea ( ) const
inline

Definition at line 88 of file qgsattributeeditorcontext.h.

◆ formMode()

FormMode QgsAttributeEditorContext::formMode ( ) const
inline

Returns the form mode.

See also
setFormMode()

Definition at line 101 of file qgsattributeeditorcontext.h.

◆ parentContext()

const QgsAttributeEditorContext* QgsAttributeEditorContext::parentContext ( ) const
inline

Definition at line 127 of file qgsattributeeditorcontext.h.

◆ relation()

const QgsRelation& QgsAttributeEditorContext::relation ( ) const
inline

Definition at line 94 of file qgsattributeeditorcontext.h.

◆ relationMode()

RelationMode QgsAttributeEditorContext::relationMode ( ) const
inline

Definition at line 95 of file qgsattributeeditorcontext.h.

◆ setAllowCustomUi()

void QgsAttributeEditorContext::setAllowCustomUi ( bool  allow)
inline

Sets whether the attribute editor should permit use of custom UI forms.

Parameters
allowset to true to allow custom UI forms, or false to disable them and use default generated QGIS forms
See also
allowCustomUi()
Since
QGIS 2.16

Definition at line 125 of file qgsattributeeditorcontext.h.

◆ setDistanceArea()

void QgsAttributeEditorContext::setDistanceArea ( const QgsDistanceArea distanceArea)
inline

Definition at line 79 of file qgsattributeeditorcontext.h.

◆ setFormMode()

void QgsAttributeEditorContext::setFormMode ( FormMode  mode)
inline

Sets the form mode.

Parameters
modeform mode
See also
formMode()
Since
QGIS 2.16

Definition at line 109 of file qgsattributeeditorcontext.h.

◆ setRelation()

void QgsAttributeEditorContext::setRelation ( const QgsRelation relation,
RelationMode  mode 
)
inline

Definition at line 93 of file qgsattributeeditorcontext.h.

◆ setVectorLayerTools()

void QgsAttributeEditorContext::setVectorLayerTools ( QgsVectorLayerTools vlTools)
inline

Definition at line 90 of file qgsattributeeditorcontext.h.

◆ vectorLayerTools()

const QgsVectorLayerTools* QgsAttributeEditorContext::vectorLayerTools ( ) const
inline

Definition at line 91 of file qgsattributeeditorcontext.h.


The documentation for this class was generated from the following file: