mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			188 lines
		
	
	
		
			4.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			188 lines
		
	
	
		
			4.8 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.
 | 
						|
 :rtype: str
 | 
						|
%End
 | 
						|
 | 
						|
    QString shortTitle() const;
 | 
						|
%Docstring
 | 
						|
The short title is used to label user interface elements like buttons
 | 
						|
 :rtype: str
 | 
						|
%End
 | 
						|
 | 
						|
    QUuid id() const;
 | 
						|
%Docstring
 | 
						|
 Returns a unique id for this action.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
 :rtype: QUuid
 | 
						|
%End
 | 
						|
 | 
						|
    bool isValid() const;
 | 
						|
%Docstring
 | 
						|
 Returns true if this action was a default constructed one.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
 :rtype: bool
 | 
						|
%End
 | 
						|
 | 
						|
    QString iconPath() const;
 | 
						|
%Docstring
 | 
						|
The path to the icon
 | 
						|
 :rtype: str
 | 
						|
%End
 | 
						|
 | 
						|
    QIcon icon() const;
 | 
						|
%Docstring
 | 
						|
The icon
 | 
						|
 :rtype: QIcon
 | 
						|
%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
 | 
						|
 :rtype: str
 | 
						|
%End
 | 
						|
 | 
						|
    ActionType type() const;
 | 
						|
%Docstring
 | 
						|
The action type
 | 
						|
 :rtype: ActionType
 | 
						|
%End
 | 
						|
 | 
						|
    bool capture() const;
 | 
						|
%Docstring
 | 
						|
Whether to capture output for display when this action is run
 | 
						|
 :rtype: bool
 | 
						|
%End
 | 
						|
 | 
						|
    bool runable() const;
 | 
						|
%Docstring
 | 
						|
Checks if the action is runable on the current platform
 | 
						|
 :rtype: bool
 | 
						|
%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.
 | 
						|
 | 
						|
.. seealso:: QgsActionScope
 | 
						|
.. versionadded:: 3.0
 | 
						|
 :rtype: set of str
 | 
						|
%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   *
 | 
						|
 ************************************************************************/
 |