mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
177 lines
4.6 KiB
Plaintext
177 lines
4.6 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsaction.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsAction
|
|
{
|
|
%Docstring
|
|
Utility class that encapsulates an action based on vector attributes.
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsaction.h"
|
|
%End
|
|
public:
|
|
enum ActionType
|
|
{
|
|
Generic,
|
|
GenericPython,
|
|
Mac,
|
|
Windows,
|
|
Unix,
|
|
OpenUrl,
|
|
};
|
|
|
|
QgsAction();
|
|
%Docstring
|
|
Default constructor
|
|
%End
|
|
|
|
QgsAction( ActionType type, const QString &description, const QString &command, bool capture = false );
|
|
%Docstring
|
|
Create a new QgsAction
|
|
|
|
\param type The type of this action
|
|
\param description A human readable description string
|
|
\param command The action text. Its interpretation depends on the type
|
|
\param capture If this is set to true, the output will be captured when an action is run
|
|
%End
|
|
|
|
QgsAction( ActionType type, const QString &description, const QString &action, const QString &icon, bool capture, const QString &shortTitle = QString(), const QSet<QString> &actionScopes = QSet<QString>() );
|
|
%Docstring
|
|
Create a new QgsAction
|
|
|
|
\param type The type of this action
|
|
\param description A human readable description string
|
|
\param action The action text. Its interpretation depends on the type
|
|
\param icon Path to an icon for this action
|
|
\param capture If this is set to true, the output will be captured when an action is run
|
|
\param shortTitle A short string used to label user interface elements like buttons
|
|
\param actionScopes A set of scopes in which this action will be available
|
|
%End
|
|
|
|
QString name() const;
|
|
%Docstring
|
|
The name of the action. This may be a longer description.
|
|
%End
|
|
|
|
QString shortTitle() const;
|
|
%Docstring
|
|
The short title is used to label user interface elements like buttons
|
|
%End
|
|
|
|
QUuid id() const;
|
|
%Docstring
|
|
Returns a unique id for this action.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
bool isValid() const;
|
|
%Docstring
|
|
Returns true if this action was a default constructed one.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
QString iconPath() const;
|
|
%Docstring
|
|
The path to the icon
|
|
%End
|
|
|
|
QIcon icon() const;
|
|
%Docstring
|
|
The icon
|
|
%End
|
|
|
|
QString command() const;
|
|
%Docstring
|
|
Returns the command that is executed by this action.
|
|
How the content is interpreted depends on the type() and
|
|
the actionScope().
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
ActionType type() const;
|
|
%Docstring
|
|
The action type
|
|
%End
|
|
|
|
bool capture() const;
|
|
%Docstring
|
|
Whether to capture output for display when this action is run
|
|
%End
|
|
|
|
bool runable() const;
|
|
%Docstring
|
|
Checks if the action is runable on the current platform
|
|
%End
|
|
|
|
void run( QgsVectorLayer *layer, const QgsFeature &feature, const QgsExpressionContext &expressionContext ) const;
|
|
%Docstring
|
|
Run this action.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
void run( const QgsExpressionContext &expressionContext ) const;
|
|
%Docstring
|
|
Run this action.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
QSet<QString> actionScopes() const;
|
|
%Docstring
|
|
The action scopes define where an action will be available.
|
|
Action scopes may offer additional variables like the clicked
|
|
coordinate.
|
|
|
|
\see QgsActionScope
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
void setActionScopes( const QSet<QString> &actionScopes );
|
|
%Docstring
|
|
The action scopes define where an action will be available.
|
|
Action scopes may offer additional variables like the clicked
|
|
coordinate.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
void readXml( const QDomNode &actionNode );
|
|
%Docstring
|
|
Reads an XML definition from actionNode
|
|
into this object.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
void writeXml( QDomNode &actionsNode ) const;
|
|
%Docstring
|
|
Appends an XML definition for this action as a new
|
|
child node to actionsNode.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsaction.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|