mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-29 00:03:59 -04:00
Merge pull request #520 from 3nids/removeaction
add removeAction method to layer actions
This commit is contained in:
commit
95f49beede
@ -51,6 +51,9 @@ class QgsAttributeAction
|
|||||||
// dialog box.
|
// dialog box.
|
||||||
void addAction( QgsAction::ActionType type, QString name, QString action, bool capture = false );
|
void addAction( QgsAction::ActionType type, QString name, QString action, bool capture = false );
|
||||||
|
|
||||||
|
//! Remove an action at given index
|
||||||
|
void removeAction( int index );
|
||||||
|
|
||||||
/*! Does the given values. defaultValueIndex is the index of the
|
/*! Does the given values. defaultValueIndex is the index of the
|
||||||
* field to be used if the action has a $currfield placeholder.
|
* field to be used if the action has a $currfield placeholder.
|
||||||
* @note added in 1.9
|
* @note added in 1.9
|
||||||
|
@ -45,6 +45,14 @@ void QgsAttributeAction::addAction( QgsAction::ActionType type, QString name, QS
|
|||||||
mActions << QgsAction( type, name, action, capture );
|
mActions << QgsAction( type, name, action, capture );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QgsAttributeAction::removeAction( int index )
|
||||||
|
{
|
||||||
|
if ( index >= 0 && index < mActions.size() )
|
||||||
|
{
|
||||||
|
mActions.removeAt( index );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValueIndex )
|
void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValueIndex )
|
||||||
{
|
{
|
||||||
QMap<QString, QVariant> substitutionMap;
|
QMap<QString, QVariant> substitutionMap;
|
||||||
|
@ -109,6 +109,9 @@ class CORE_EXPORT QgsAttributeAction
|
|||||||
// dialog box.
|
// dialog box.
|
||||||
void addAction( QgsAction::ActionType type, QString name, QString action, bool capture = false );
|
void addAction( QgsAction::ActionType type, QString name, QString action, bool capture = false );
|
||||||
|
|
||||||
|
//! Remove an action at given index
|
||||||
|
void removeAction( int index );
|
||||||
|
|
||||||
/*! Does the given values. defaultValueIndex is the index of the
|
/*! Does the given values. defaultValueIndex is the index of the
|
||||||
* field to be used if the action has a $currfield placeholder.
|
* field to be used if the action has a $currfield placeholder.
|
||||||
* @note added in 1.9
|
* @note added in 1.9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user