Skip to content

Commit f4f45bf

Browse files
committedApr 2, 2017
Autogenerate more sip files
1 parent 16594da commit f4f45bf

File tree

4 files changed

+260
-226
lines changed

4 files changed

+260
-226
lines changed
 

‎python/auto_sip.blacklist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ core/conversions.sip
22
core/qgsexception.sip
33
core/qgis.sip
44
core/qgsapplication.sip
5-
core/qgsaction.sip
6-
core/qgsactionmanager.sip
75
core/qgsaggregatecalculator.sip
86
core/qgsattributetableconfig.sip
97
core/qgsattributeeditorelement.sip

‎python/core/qgsaction.sip

Lines changed: 136 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
1-
/***************************************************************************
2-
qgsaction.h - QgsAction
3-
4-
---------------------
5-
begin : 18.4.2016
6-
copyright : (C) 2016 by Matthias Kuhn
7-
email : matthias@opengis.ch
8-
***************************************************************************
9-
* *
10-
* This program is free software; you can redistribute it and/or modify *
11-
* it under the terms of the GNU General Public License as published by *
12-
* the Free Software Foundation; either version 2 of the License, or *
13-
* (at your option) any later version. *
14-
* *
15-
***************************************************************************/
16-
17-
/** \ingroup core
18-
* Utility class that encapsulates an action based on vector attributes.
19-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/core/qgsaction.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
2012
class QgsAction
2113
{
14+
%Docstring
15+
Utility class that encapsulates an action based on vector attributes.
16+
%End
17+
2218
%TypeHeaderCode
23-
#include <qgsaction.h>
19+
#include "qgsaction.h"
2420
%End
2521
public:
2622
enum ActionType
@@ -33,118 +29,148 @@ class QgsAction
3329
OpenUrl,
3430
};
3531

36-
/**
37-
* Default constructor
38-
*/
3932
QgsAction();
33+
%Docstring
34+
Default constructor
35+
%End
36+
37+
QgsAction( ActionType type, const QString &description, const QString &command, bool capture = false );
38+
%Docstring
39+
Create a new QgsAction
40+
41+
@param type The type of this action
42+
@param description A human readable description string
43+
@param command The action text. Its interpretation depends on the type
44+
@param capture If this is set to true, the output will be captured when an action is run
45+
%End
46+
47+
QgsAction( ActionType type, const QString &description, const QString &action, const QString &icon, bool capture, const QString &shortTitle = QString(), const QSet<QString> &actionScopes = QSet<QString>() );
48+
%Docstring
49+
Create a new QgsAction
50+
51+
@param type The type of this action
52+
@param description A human readable description string
53+
@param action The action text. Its interpretation depends on the type
54+
@param icon Path to an icon for this action
55+
@param capture If this is set to true, the output will be captured when an action is run
56+
@param shortTitle A short string used to label user interface elements like buttons
57+
@param actionScopes A set of scopes in which this action will be available
58+
%End
4059

41-
/**
42-
* Create a new QgsAction
43-
*
44-
* @param type The type of this action
45-
* @param description A human readable description string
46-
* @param command The action text. Its interpretation depends on the type
47-
* @param capture If this is set to true, the output will be captured when an action is run
48-
*/
49-
QgsAction( ActionType type, const QString& description, const QString& command, bool capture = false );
50-
51-
/**
52-
* Create a new QgsAction
53-
*
54-
* @param type The type of this action
55-
* @param description A human readable description string
56-
* @param action The action text. Its interpretation depends on the type
57-
* @param icon Path to an icon for this action
58-
* @param capture If this is set to true, the output will be captured when an action is run
59-
* @param shortTitle A short string used to label user interface elements like buttons
60-
* @param actionScopes A set of scopes in which this action will be available
61-
*/
62-
QgsAction( ActionType type, const QString& description, const QString& action, const QString& icon, bool capture, const QString& shortTitle = QString(), const QSet<QString>& actionScopes = QSet<QString>() );
63-
64-
//! The name of the action. This may be a longer description.
6560
QString name() const;
61+
%Docstring
62+
The name of the action. This may be a longer description.
63+
%End
6664

67-
//! The short title is used to label user interface elements like buttons
6865
QString shortTitle() const;
66+
%Docstring
67+
The short title is used to label user interface elements like buttons
68+
%End
6969

70-
/**
71-
* Returns a unique id for this action.
72-
*
73-
* @note Added in QGIS 3.0
74-
*/
7570
QUuid id() const;
71+
%Docstring
72+
Returns a unique id for this action.
73+
74+
.. versionadded:: 3.0
75+
%End
7676

77-
/**
78-
* Returns true if this action was a default constructed one.
79-
*
80-
* @note Added in QGIS 3.0
81-
*/
8277
bool isValid() const;
78+
%Docstring
79+
Returns true if this action was a default constructed one.
80+
81+
.. versionadded:: 3.0
82+
%End
8383

84-
//! The path to the icon
8584
QString iconPath() const;
85+
%Docstring
86+
The path to the icon
87+
%End
8688

87-
//! The icon
8889
QIcon icon() const;
90+
%Docstring
91+
The icon
92+
%End
8993

90-
//! The command
9194
QString command() const;
95+
%Docstring
96+
Returns the command that is executed by this action.
97+
How the content is interpreted depends on the type() and
98+
the actionScope().
99+
100+
.. versionadded:: 3.0
101+
%End
92102

93-
//! The action type
94103
ActionType type() const;
104+
%Docstring
105+
The action type
106+
%End
95107

96-
//! Whether to capture output for display when this action is run
97108
bool capture() const;
109+
%Docstring
110+
Whether to capture output for display when this action is run
111+
%End
98112

99-
//! Checks if the action is runable on the current platform
100113
bool runable() const;
114+
%Docstring
115+
Checks if the action is runable on the current platform
116+
%End
117+
118+
void run( QgsVectorLayer *layer, const QgsFeature &feature, const QgsExpressionContext &expressionContext ) const;
119+
%Docstring
120+
Run this action.
121+
122+
.. versionadded:: 3.0
123+
%End
124+
125+
void run( const QgsExpressionContext &expressionContext ) const;
126+
%Docstring
127+
Run this action.
128+
129+
.. versionadded:: 3.0
130+
%End
101131

102-
/**
103-
* Run this action.
104-
*
105-
* @note Added in QGIS 3.0
106-
*/
107-
void run( QgsVectorLayer* layer, const QgsFeature& feature, const QgsExpressionContext& expressionContext ) const;
108-
109-
/**
110-
* Run this action.
111-
*
112-
* @note Added in QGIS 3.0
113-
*/
114-
void run( const QgsExpressionContext& expressionContext ) const;
115-
116-
/**
117-
* The action scopes define where an action will be available.
118-
* Action scopes may offer additional variables like the clicked
119-
* coordinate.
120-
*
121-
* @see QgsActionScope
122-
* @note Added in QGIS 3.0
123-
*/
124132
QSet<QString> actionScopes() const;
133+
%Docstring
134+
The action scopes define where an action will be available.
135+
Action scopes may offer additional variables like the clicked
136+
coordinate.
137+
138+
@see QgsActionScope
139+
.. versionadded:: 3.0
140+
%End
141+
142+
void setActionScopes( const QSet<QString> &actionScopes );
143+
%Docstring
144+
The action scopes define where an action will be available.
145+
Action scopes may offer additional variables like the clicked
146+
coordinate.
147+
148+
.. versionadded:: 3.0
149+
%End
150+
151+
void readXml( const QDomNode &actionNode );
152+
%Docstring
153+
Reads an XML definition from actionNode
154+
into this object.
155+
156+
.. versionadded:: 3.0
157+
%End
158+
159+
void writeXml( QDomNode &actionsNode ) const;
160+
%Docstring
161+
Appends an XML definition for this action as a new
162+
child node to actionsNode.
163+
164+
.. versionadded:: 3.0
165+
%End
125166

126-
/**
127-
* The action scopes define where an action will be available.
128-
* Action scopes may offer additional variables like the clicked
129-
* coordinate.
130-
*
131-
* @note Added in QGIS 3.0
132-
*/
133-
void setActionScopes( const QSet<QString>& actionScopes );
134-
135-
/**
136-
* Reads an XML definition from actionNode
137-
* into this object.
138-
*
139-
* @note Added in QGIS 3.0
140-
*/
141-
void readXml( const QDomNode& actionNode );
142-
143-
/**
144-
* Appends an XML definition for this action as a new
145-
* child node to actionsNode.
146-
*
147-
* @note Added in QGIS 3.0
148-
*/
149-
void writeXml(QDomNode& actionsNode ) const;
150167
};
168+
169+
170+
/************************************************************************
171+
* This file has been generated automatically from *
172+
* *
173+
* src/core/qgsaction.h *
174+
* *
175+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
176+
************************************************************************/

‎python/core/qgsactionmanager.sip

Lines changed: 122 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,134 @@
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+
2814

2915
class QgsActionManager
3016
{
17+
3118
%TypeHeaderCode
32-
#include <qgsactionmanager.h>
19+
#include "qgsactionmanager.h"
3320
%End
3421
public:
35-
//! Constructor
3622
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
3774

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
8475
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.
85114

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
123125

124126
};
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+
************************************************************************/

‎src/core/qgsactionmanager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class CORE_EXPORT QgsActionManager
8282
*/
8383
void removeAction( const QUuid &actionId );
8484

85-
/** Does the given values. defaultValueIndex is the index of the
85+
/** Does the given action. defaultValueIndex is the index of the
8686
* field to be used if the action has a $currfield placeholder.
8787
* @note available in python bindings as doActionFeature
8888
*/
89-
void doAction( const QUuid &actionId, const QgsFeature &feature, int defaultValueIndex = 0 );
89+
void doAction( const QUuid &actionId, const QgsFeature &feature, int defaultValueIndex = 0 ) SIP_PYNAME( doActionFeature );
9090

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

0 commit comments

Comments
 (0)
Please sign in to comment.