Skip to content

Commit

Permalink
Update doc and sip binding
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Nov 20, 2017
1 parent 35459c4 commit 4fe0013
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 8 deletions.
13 changes: 9 additions & 4 deletions python/core/qgsactionmanager.sip
Expand Up @@ -62,13 +62,18 @@ class QgsActionManager
//! Remove an action at given index
void removeAction( int index );

/** Does the given values. defaultValueIndex is the index of the
* field to be used if the action has a $currfield placeholder.
* @note available in python bindings as doActionFeature
/**
* Does the given action.
*
* @param index Index of the action
* @param feat Feature to run action for
* @param defaultValueIndex Index of the field to be used if the action has a $currfield placeholder.
* @param scope Expression context scope to add during expression evaluation
*/
void doAction( int index,
const QgsFeature &feat,
int defaultValueIndex = 0 ) /PyName=doActionFeature/;
int defaultValueIndex = 0,
const QgsExpressionContextScope &scope = QgsExpressionContextScope() ) /PyName=doActionFeature/;

/** Does the action using the expression engine to replace any embedded expressions
* in the action definition.
Expand Down
14 changes: 14 additions & 0 deletions python/gui/qgsactionmenu.sip
Expand Up @@ -62,6 +62,20 @@ class QgsActionMenu : QMenu
*/
void setFeature( QgsFeature* feature );

/**
* Sets an expression context scope used to resolve underlying actions.
*
* @note Added in QGIS 2.18
*/
void setExpressionContextScope( const QgsExpressionContextScope &scope );

/**
* Returns an expression context scope used to resolve underlying actions.
*
* @note Added in QGIS 2.18
*/
QgsExpressionContextScope expressionContextScope() const;

signals:
void reinit();

Expand Down
14 changes: 14 additions & 0 deletions python/gui/qgsidentifymenu.sip
Expand Up @@ -83,6 +83,20 @@ class QgsIdentifyMenu : QMenu
*/
QList<QgsMapToolIdentify::IdentifyResult> exec( const QList<QgsMapToolIdentify::IdentifyResult>& idResults, QPoint pos );

/**
* Sets an expression context scope used to resolve underlying actions.
*
* @note Added in QGIS 2.18
*/
void setExpressionContextScope( const QgsExpressionContextScope &scope );

/**
* Returns an expression context scope used to resolve underlying actions.
*
* @note Added in QGIS 2.18
*/
QgsExpressionContextScope expressionContextScope() const;

protected:
virtual void closeEvent( QCloseEvent *e );
};
8 changes: 4 additions & 4 deletions src/core/qgsactionmanager.h
Expand Up @@ -81,10 +81,10 @@ class CORE_EXPORT QgsActionManager
/**
* Does the given action.
*
* @param actionId action id
* @param feature feature to run action for
* @param defaultValueIndex index of the field to be used if the action has a $currfield placeholder.
* @param scope expression context scope to add during expression evaluation
* @param index Index of the action
* @param feat Feature to run action for
* @param defaultValueIndex Index of the field to be used if the action has a $currfield placeholder.
* @param scope Expression context scope to add during expression evaluation
*
* @note available in python bindings as doActionFeature
*/
Expand Down

0 comments on commit 4fe0013

Please sign in to comment.