23 , mUuid( action.id() )
35 element->mUuid = mUuid;
42 if ( ! mAction.
isValid() && ! mUuid.isNull() && layer )
51 mUuid = newAction.
id();
55QString QgsAttributeEditorAction::typeIdentifier()
const
57 return QStringLiteral(
"attributeEditorAction" );
60void QgsAttributeEditorAction::saveConfiguration( QDomElement &elem, QDomDocument &doc )
const
63 elem.setAttribute( QStringLiteral(
"ActionUUID" ), mUuid.toString() );
66void QgsAttributeEditorAction::loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields )
71 mUuid = QUuid( element.attribute( QStringLiteral(
"ActionUUID" ) ) );
The Qgis class provides global constants for use throughout the application.
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.