24 #ifndef QGSACTIONMANAGER_H 25 #define QGSACTIONMANAGER_H 54 , mDefaultAction( -1 )
76 void addAction(
const QgsAction& action );
79 void removeAction(
int index );
91 void doAction(
int index,
93 int defaultValueIndex = 0,
104 void doAction(
int index,
116 Q_DECL_DEPRECATED
void doAction(
int index,
155 bool readXML(
const QDomNode& layer_node );
160 int size()
const {
return mActions.size(); }
165 const QgsAction&
at(
int idx )
const {
return mActions.at( idx ); }
175 Q_DECL_DEPRECATED
static void setPythonExecute(
void ( * )(
const QString & ) );
181 int defaultAction()
const {
return mDefaultAction < 0 || mDefaultAction >= size() ? -1 : mDefaultAction; }
193 static void ( *smPythonExecute )(
const QString & );
196 void ( *executePython )(
const QString & ) =
nullptr );
QgsVectorLayer * layer() const
Return the layer.
int defaultAction() const
Returns the index of the default action, or -1 if no default action is available. ...
void setDefaultAction(int actionNumber)
Set the index of the default action.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
const QgsAction & at(int idx) const
Get the action at the specified index.
QgsActionManager(QgsVectorLayer *layer)
Constructor.
Utility class that encapsulates an action based on vector attributes.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Storage and management of actions associated with a layer.
Single scope for storing variables and functions for use within a QgsExpressionContext.
QgsAction operator[](int idx) const
Get the action at the specified index.
Represents a vector layer which manages a vector based data sets.
int size() const
Get the number of actions managed by this.