File tree Expand file tree Collapse file tree 4 files changed +41
-8
lines changed Expand file tree Collapse file tree 4 files changed +41
-8
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,18 @@ class QgsActionManager
62
62
//! Remove an action at given index
63
63
void removeAction( int index );
64
64
65
- /** Does the given values. defaultValueIndex is the index of the
66
- * field to be used if the action has a $currfield placeholder.
67
- * @note available in python bindings as doActionFeature
65
+ /**
66
+ * Does the given action.
67
+ *
68
+ * @param index Index of the action
69
+ * @param feat Feature to run action for
70
+ * @param defaultValueIndex Index of the field to be used if the action has a $currfield placeholder.
71
+ * @param scope Expression context scope to add during expression evaluation
68
72
*/
69
73
void doAction( int index,
70
74
const QgsFeature &feat,
71
- int defaultValueIndex = 0 ) /PyName=doActionFeature/;
75
+ int defaultValueIndex = 0,
76
+ const QgsExpressionContextScope &scope = QgsExpressionContextScope() ) /PyName=doActionFeature/;
72
77
73
78
/** Does the action using the expression engine to replace any embedded expressions
74
79
* in the action definition.
Original file line number Diff line number Diff line change @@ -62,6 +62,20 @@ class QgsActionMenu : QMenu
62
62
*/
63
63
void setFeature( QgsFeature* feature );
64
64
65
+ /**
66
+ * Sets an expression context scope used to resolve underlying actions.
67
+ *
68
+ * @note Added in QGIS 2.18
69
+ */
70
+ void setExpressionContextScope( const QgsExpressionContextScope &scope );
71
+
72
+ /**
73
+ * Returns an expression context scope used to resolve underlying actions.
74
+ *
75
+ * @note Added in QGIS 2.18
76
+ */
77
+ QgsExpressionContextScope expressionContextScope() const;
78
+
65
79
signals:
66
80
void reinit();
67
81
Original file line number Diff line number Diff line change @@ -83,6 +83,20 @@ class QgsIdentifyMenu : QMenu
83
83
*/
84
84
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult>& idResults, QPoint pos );
85
85
86
+ /**
87
+ * Sets an expression context scope used to resolve underlying actions.
88
+ *
89
+ * @note Added in QGIS 2.18
90
+ */
91
+ void setExpressionContextScope( const QgsExpressionContextScope &scope );
92
+
93
+ /**
94
+ * Returns an expression context scope used to resolve underlying actions.
95
+ *
96
+ * @note Added in QGIS 2.18
97
+ */
98
+ QgsExpressionContextScope expressionContextScope() const;
99
+
86
100
protected:
87
101
virtual void closeEvent( QCloseEvent *e );
88
102
};
Original file line number Diff line number Diff line change @@ -81,10 +81,10 @@ class CORE_EXPORT QgsActionManager
81
81
/* *
82
82
* Does the given action.
83
83
*
84
- * @param actionId action id
85
- * @param feature feature to run action for
86
- * @param defaultValueIndex index of the field to be used if the action has a $currfield placeholder.
87
- * @param scope expression context scope to add during expression evaluation
84
+ * @param index Index of the action
85
+ * @param feat Feature to run action for
86
+ * @param defaultValueIndex Index of the field to be used if the action has a $currfield placeholder.
87
+ * @param scope Expression context scope to add during expression evaluation
88
88
*
89
89
* @note available in python bindings as doActionFeature
90
90
*/
You can’t perform that action at this time.
0 commit comments