24 , mUuid( action.id() )
36 element->mUuid = mUuid;
43 if ( ! mAction.
isValid() && ! mUuid.isNull() && layer )
52 mUuid = newAction.
id();
56QString QgsAttributeEditorAction::typeIdentifier()
const
58 return QStringLiteral(
"attributeEditorAction" );
61void QgsAttributeEditorAction::saveConfiguration( QDomElement &elem, QDomDocument &doc )
const
64 elem.setAttribute( QStringLiteral(
"ActionUUID" ), mUuid.toString() );
67void QgsAttributeEditorAction::loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields )
72 mUuid = QUuid( element.attribute( QStringLiteral(
"ActionUUID" ) ) );
QgsAction action(QUuid id) const
Gets an action by its id.
Utility class that encapsulates an action based on vector attributes.
bool isValid() const
Returns true if this action was a default constructed one.
QUuid id() const
Returns a unique id for this action.
This element will load a layer action onto the form.
const QgsAction & action(const QgsVectorLayer *layer) const
Returns the (possibly lazy loaded) action for the given layer.
QgsAttributeEditorAction(const QgsAction &action, QgsAttributeEditorElement *parent)
Creates a new element which can display a layer action.
QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const override
Returns a clone of this element.
void setAction(const QgsAction &newAction)
Set the action to newAction.
This is an abstract base class for any elements of a drag and drop form.
QgsAttributeEditorElement * parent() const
Gets the parent of this element.
Container of fields for a vector layer.
The class is used as a container of context for various read/write operations on other objects.
Represents a vector layer which manages a vector based data sets.
QgsActionManager * actions()
Returns all layer actions defined on this layer.