|
1 |
| -/*************************************************************************** |
2 |
| - qgsactionmanager.sip |
3 |
| - |
4 |
| - These classes store and control the management and execution of actions |
5 |
| - associated with a particular Qgis layer. Actions are defined to be |
6 |
| - external programs that are run with user-specified inputs that can |
7 |
| - depend on the contents of layer attributes. |
8 |
| - |
9 |
| - ------------------- |
10 |
| - begin : Oct 24 2004 |
11 |
| - copyright : (C) 2004 by Gavin Macaulay |
12 |
| - email : gavin at macaulay dot co dot nz |
13 |
| - ***************************************************************************/ |
14 |
| - |
15 |
| -/*************************************************************************** |
16 |
| - * * |
17 |
| - * This program is free software; you can redistribute it and/or modify * |
18 |
| - * it under the terms of the GNU General Public License as published by * |
19 |
| - * the Free Software Foundation; either version 2 of the License, or * |
20 |
| - * (at your option) any later version. * |
21 |
| - * * |
22 |
| - ***************************************************************************/ |
23 |
| - |
24 |
| -/** \class QgsActionManager |
25 |
| - * \brief Storage and management of actions associated with Qgis layer |
26 |
| - * attributes. |
27 |
| - */ |
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/core/qgsactionmanager.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
28 | 14 |
|
29 | 15 | class QgsActionManager
|
30 | 16 | {
|
| 17 | + |
31 | 18 | %TypeHeaderCode
|
32 |
| -#include <qgsactionmanager.h> |
| 19 | +#include "qgsactionmanager.h" |
33 | 20 | %End
|
34 | 21 | public:
|
35 |
| - //! Constructor |
36 | 22 | QgsActionManager( QgsVectorLayer *layer );
|
| 23 | +%Docstring |
| 24 | +Constructor |
| 25 | +%End |
| 26 | + |
| 27 | + QUuid addAction( QgsAction::ActionType type, const QString &name, const QString &command, bool capture = false ); |
| 28 | +%Docstring |
| 29 | + Add an action with the given name and action details. |
| 30 | + Will happily have duplicate names and actions. If |
| 31 | + capture is true, when running the action using doAction(), |
| 32 | + any stdout from the process will be captured and displayed in a |
| 33 | + dialog box. |
| 34 | +%End |
| 35 | + |
| 36 | + QUuid addAction( QgsAction::ActionType type, const QString &name, const QString &command, const QString &icon, bool capture = false ); |
| 37 | +%Docstring |
| 38 | + Add an action with the given name and action details. |
| 39 | + Will happily have duplicate names and actions. If |
| 40 | + capture is true, when running the action using doAction(), |
| 41 | + any stdout from the process will be captured and displayed in a |
| 42 | + dialog box. |
| 43 | +%End |
| 44 | + |
| 45 | + void addAction( const QgsAction &action ); |
| 46 | +%Docstring |
| 47 | + Add a new action to this list. |
| 48 | +%End |
| 49 | + |
| 50 | + void removeAction( const QUuid &actionId ); |
| 51 | +%Docstring |
| 52 | + Remove an action by its id. |
| 53 | + |
| 54 | +.. versionadded:: 3.0 |
| 55 | +%End |
| 56 | + |
| 57 | + void doAction( const QUuid &actionId, const QgsFeature &feature, int defaultValueIndex = 0 ) /PyName=doActionFeature/; |
| 58 | +%Docstring |
| 59 | + Does the given action. defaultValueIndex is the index of the |
| 60 | + field to be used if the action has a $currfield placeholder. |
| 61 | +.. note:: |
| 62 | + |
| 63 | + available in python bindings as doActionFeature |
| 64 | +%End |
| 65 | + |
| 66 | + void doAction( const QUuid &actionId, const QgsFeature &feature, const QgsExpressionContext &context ); |
| 67 | +%Docstring |
| 68 | + Does the action using the expression engine to replace any embedded expressions |
| 69 | + in the action definition. |
| 70 | + @param actionId action id |
| 71 | + @param feature feature to run action for |
| 72 | + @param context expression context to evaluate expressions under |
| 73 | +%End |
37 | 74 |
|
38 |
| - //! Destructor |
39 |
| - virtual ~QgsActionManager(); |
40 |
| - |
41 |
| - /** Add an action with the given name and action details. |
42 |
| - * Will happily have duplicate names and actions. If |
43 |
| - * capture is true, when running the action using doAction(), |
44 |
| - * any stdout from the process will be captured and displayed in a |
45 |
| - * dialog box. |
46 |
| - */ |
47 |
| - QUuid addAction(QgsAction::ActionType type, const QString& name, const QString& command, bool capture = false ); |
48 |
| - |
49 |
| - /** Add an action with the given name and action details. |
50 |
| - * Will happily have duplicate names and actions. If |
51 |
| - * capture is true, when running the action using doAction(), |
52 |
| - * any stdout from the process will be captured and displayed in a |
53 |
| - * dialog box. |
54 |
| - */ |
55 |
| - QUuid addAction(QgsAction::ActionType type, const QString& name, const QString& command, const QString& icon, bool capture = false ); |
56 |
| - |
57 |
| - /** |
58 |
| - * Add a new action to this list. |
59 |
| - */ |
60 |
| - void addAction( const QgsAction& action ); |
61 |
| - |
62 |
| - /** |
63 |
| - * Remove an action by its id. |
64 |
| - * |
65 |
| - * @note Added in QGIS 3.0 |
66 |
| - */ |
67 |
| - void removeAction( const QUuid& actionId ); |
68 |
| - |
69 |
| - /** Does the given values. defaultValueIndex is the index of the |
70 |
| - * field to be used if the action has a $currfield placeholder. |
71 |
| - * @note available in python bindings as doActionFeature |
72 |
| - */ |
73 |
| - void doAction(const QUuid& actionId, const QgsFeature& feature, int defaultValueIndex = 0 ) /PyName=doActionFeature/; |
74 |
| - |
75 |
| - /** Does the action using the expression engine to replace any embedded expressions |
76 |
| - * in the action definition. |
77 |
| - * @param actionId action id |
78 |
| - * @param feature feature to run action for |
79 |
| - * @param context expression context to evaluate expressions under |
80 |
| - */ |
81 |
| - void doAction( const QUuid& actionId, const QgsFeature& feature, const QgsExpressionContext& context ); |
82 |
| - |
83 |
| - //! Removes all actions |
84 | 75 | void clearActions();
|
| 76 | +%Docstring |
| 77 | +Removes all actions |
| 78 | +%End |
| 79 | + |
| 80 | + QList<QgsAction> actions( const QString &actionScope = QString() ) const; |
| 81 | +%Docstring |
| 82 | + Return a list of actions that are available in the given action scope. |
| 83 | + If no action scope is provided, all actions will be returned. |
| 84 | + |
| 85 | +.. versionadded:: 3.0 |
| 86 | +%End |
| 87 | + |
| 88 | + QgsVectorLayer *layer() const; |
| 89 | +%Docstring |
| 90 | +Return the layer |
| 91 | +%End |
| 92 | + |
| 93 | + bool writeXml( QDomNode &layer_node ) const; |
| 94 | +%Docstring |
| 95 | +Writes the actions out in XML format |
| 96 | +%End |
| 97 | + |
| 98 | + bool readXml( const QDomNode &layer_node ); |
| 99 | +%Docstring |
| 100 | +Reads the actions in in XML format |
| 101 | +%End |
| 102 | + |
| 103 | + QgsAction action( const QUuid &id ); |
| 104 | +%Docstring |
| 105 | + Get an action by its id. |
| 106 | + |
| 107 | +.. versionadded:: 3.0 |
| 108 | +%End |
| 109 | + |
| 110 | + void setDefaultAction( const QString &actionScope, const QUuid &actionId ); |
| 111 | +%Docstring |
| 112 | + Each scope can have a default action. This will be saved in the project |
| 113 | + file. |
85 | 114 |
|
86 |
| - /** |
87 |
| - * Return a list of actions that are available in the given action scope. |
88 |
| - * If no action scope is provided, all actions will be returned. |
89 |
| - */ |
90 |
| - QList<QgsAction> actions( const QString& actionScope = QString() ) const; |
91 |
| - |
92 |
| - //! Return the layer |
93 |
| - QgsVectorLayer* layer() const; |
94 |
| - |
95 |
| - //! Writes the actions out in XML format |
96 |
| - bool writeXml( QDomNode& layer_node ) const; |
97 |
| - |
98 |
| - //! Reads the actions in in XML format |
99 |
| - bool readXml( const QDomNode& layer_node ); |
100 |
| - |
101 |
| - /** |
102 |
| - * Get an action by its id. |
103 |
| - * |
104 |
| - * @note Added in QGIS 3.0 |
105 |
| - */ |
106 |
| - QgsAction action( const QUuid& id ); |
107 |
| - |
108 |
| - /** |
109 |
| - * Each scope can have a default action. This will be saved in the project |
110 |
| - * file. |
111 |
| - * |
112 |
| - * @note Added in QGIS 3.0 |
113 |
| - */ |
114 |
| - void setDefaultAction( const QString& actionScope, const QUuid& actionId ); |
115 |
| - |
116 |
| - /** |
117 |
| - * Each scope can have a default action. This will be saved in the project |
118 |
| - * file. |
119 |
| - * |
120 |
| - * @note Added in QGIS 3.0 |
121 |
| - */ |
122 |
| - QgsAction defaultAction( const QString& actionScope ); |
| 115 | +.. versionadded:: 3.0 |
| 116 | +%End |
| 117 | + |
| 118 | + QgsAction defaultAction( const QString &actionScope ); |
| 119 | +%Docstring |
| 120 | + Each scope can have a default action. This will be saved in the project |
| 121 | + file. |
| 122 | + |
| 123 | +.. versionadded:: 3.0 |
| 124 | +%End |
123 | 125 |
|
124 | 126 | };
|
| 127 | + |
| 128 | +/************************************************************************ |
| 129 | + * This file has been generated automatically from * |
| 130 | + * * |
| 131 | + * src/core/qgsactionmanager.h * |
| 132 | + * * |
| 133 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 134 | + ************************************************************************/ |
0 commit comments