24 #ifndef QGSATTRIBUTEACTION_H
25 #define QGSATTRIBUTEACTION_H
54 mType( type ), mName( name ), mAction( action ), mCaptureOutput( capture ) {}
57 QString
name()
const {
return mName; }
60 QString
action()
const {
return mAction; }
66 bool capture()
const {
return mCaptureOutput; }
71 return mType == Generic ||
72 mType == GenericPython ||
76 #elif defined(Q_OS_MAC)
113 void removeAction(
int index );
120 void doAction(
int index,
122 int defaultValueIndex = 0 );
131 void doAction(
int index,
133 const QMap<QString, QVariant> *substitutionMap = 0 );
147 QString expandAction( QString action,
const QgsAttributeMap &attributes, uint defaultValueIndex );
159 QString expandAction( QString action,
161 const QMap<QString, QVariant> *substitutionMap = 0 );
165 bool writeXML( QDomNode& layer_node, QDomDocument& doc )
const;
168 bool readXML(
const QDomNode& layer_node );
170 int size()
const {
return mActions.size(); }
175 static void setPythonExecute(
void ( * )(
const QString & ) );
178 int defaultAction()
const {
return mDefaultAction < 0 || mDefaultAction >=
size() ? -1 : mDefaultAction; }
184 static void ( *smPythonExecute )(
const QString & );
187 void ( *executePython )(
const QString & ) = 0 );