Skip to content

Commit 4fe0013

Browse files
committedNov 20, 2017
Update doc and sip binding
1 parent 35459c4 commit 4fe0013

File tree

4 files changed

+41
-8
lines changed

4 files changed

+41
-8
lines changed
 

‎python/core/qgsactionmanager.sip

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,18 @@ class QgsActionManager
6262
//! Remove an action at given index
6363
void removeAction( int index );
6464

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
6872
*/
6973
void doAction( int index,
7074
const QgsFeature &feat,
71-
int defaultValueIndex = 0 ) /PyName=doActionFeature/;
75+
int defaultValueIndex = 0,
76+
const QgsExpressionContextScope &scope = QgsExpressionContextScope() ) /PyName=doActionFeature/;
7277

7378
/** Does the action using the expression engine to replace any embedded expressions
7479
* in the action definition.

‎python/gui/qgsactionmenu.sip

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ class QgsActionMenu : QMenu
6262
*/
6363
void setFeature( QgsFeature* feature );
6464

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+
6579
signals:
6680
void reinit();
6781

‎python/gui/qgsidentifymenu.sip

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ class QgsIdentifyMenu : QMenu
8383
*/
8484
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult>& idResults, QPoint pos );
8585

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+
86100
protected:
87101
virtual void closeEvent( QCloseEvent *e );
88102
};

‎src/core/qgsactionmanager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ class CORE_EXPORT QgsActionManager
8181
/**
8282
* Does the given action.
8383
*
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
8888
*
8989
* @note available in python bindings as doActionFeature
9090
*/

0 commit comments

Comments
 (0)
Please sign in to comment.