QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
This element will load a layer action onto the form. More...
#include <qgsattributeeditoraction.h>
Public Member Functions | |
QgsAttributeEditorAction (const QgsAction &action, QgsAttributeEditorElement *parent) | |
Creates a new element which can display a layer action. More... | |
QgsAttributeEditorAction (const QUuid &uuid, QgsAttributeEditorElement *parent) | |
Creates a new element which can display a layer action, this constructor allows to create a QgsAttributeEditorAction when actions are not yet loaded. More... | |
const QgsAction & | action (const QgsVectorLayer *layer) const |
Returns the (possibly lazy loaded) action for the given layer. More... | |
QgsAttributeEditorElement * | clone (QgsAttributeEditorElement *parent) const override |
Returns a clone of this element. More... | |
void | setAction (const QgsAction &newAction) |
Set the action to newAction. More... | |
Public Member Functions inherited from QgsAttributeEditorElement | |
QgsAttributeEditorElement (AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr) | |
Constructor. More... | |
virtual | ~QgsAttributeEditorElement ()=default |
virtual QgsAttributeEditorElement * | clone (QgsAttributeEditorElement *parent) const =0 |
Returns a clone of this element. More... | |
LabelStyle | labelStyle () const |
Returns the label style. More... | |
QString | name () const |
Returns the name of this element. More... | |
QgsAttributeEditorElement * | parent () const |
Gets the parent of this element. More... | |
void | setLabelStyle (const LabelStyle &labelStyle) |
Sets the labelStyle. More... | |
void | setShowLabel (bool showLabel) |
Controls if this element should be labeled with a title (field, relation or groupname). More... | |
bool | showLabel () const |
Controls if this element should be labeled with a title (field, relation or groupname). More... | |
QDomElement | toDomElement (QDomDocument &doc) const |
Gets the XML Dom element to save this element. More... | |
AttributeEditorType | type () const |
The type of this element. More... | |
Additional Inherited Members | |
Public Types inherited from QgsAttributeEditorElement | |
enum | AttributeEditorType { AeTypeContainer , AeTypeField , AeTypeRelation , AeTypeInvalid , AeTypeQmlElement , AeTypeHtmlElement , AeTypeAction } |
Static Public Member Functions inherited from QgsAttributeEditorElement | |
static QgsAttributeEditorElement * | create (const QDomElement &element, const QString &layerId, const QgsFields &fields, const QgsReadWriteContext &context, QgsAttributeEditorElement *parent=nullptr) |
Constructs the editor element from the given element. More... | |
Protected Attributes inherited from QgsAttributeEditorElement | |
LabelStyle | mLabelStyle |
QString | mName |
QgsAttributeEditorElement * | mParent = nullptr |
bool | mShowLabel |
AttributeEditorType | mType |
This element will load a layer action onto the form.
Definition at line 28 of file qgsattributeeditoraction.h.
QgsAttributeEditorAction::QgsAttributeEditorAction | ( | const QgsAction & | action, |
QgsAttributeEditorElement * | parent | ||
) |
Creates a new element which can display a layer action.
action | The action |
parent | The parent (used as container) |
Definition at line 21 of file qgsattributeeditoraction.cpp.
QgsAttributeEditorAction::QgsAttributeEditorAction | ( | const QUuid & | uuid, |
QgsAttributeEditorElement * | parent | ||
) |
Creates a new element which can display a layer action, this constructor allows to create a QgsAttributeEditorAction when actions are not yet loaded.
uuid | The action unique identifier (UUID). |
parent | The parent (used as container). |
Definition at line 27 of file qgsattributeeditoraction.cpp.
const QgsAction & QgsAttributeEditorAction::action | ( | const QgsVectorLayer * | layer | ) | const |
Returns the (possibly lazy loaded) action for the given layer.
Definition at line 40 of file qgsattributeeditoraction.cpp.
|
overridevirtual |
Returns a clone of this element.
To be implemented by subclasses.
Implements QgsAttributeEditorElement.
Definition at line 33 of file qgsattributeeditoraction.cpp.
void QgsAttributeEditorAction::setAction | ( | const QgsAction & | newAction | ) |
Set the action to newAction.
Definition at line 50 of file qgsattributeeditoraction.cpp.