QGIS API Documentation  2.17.0-Master (6f7b933)
Public Types | Public Member Functions | List of all members
QgsAction Class Reference

Utility class that encapsulates an action based on vector attributes. More...

#include <qgsaction.h>

Public Types

enum  ActionType {
  Generic, GenericPython, Mac, Windows,
  Unix, OpenUrl
}
 

Public Member Functions

 QgsAction (ActionType type, const QString &description, const QString &action, bool capture)
 Create a new QgsAction. More...
 
 QgsAction (ActionType type, const QString &description, const QString &action, const QString &icon, bool capture, const QString &shortTitle=QString())
 Create a new QgsAction. More...
 
 QgsAction (ActionType type, const QString &description, const QString &action, const QString &icon, bool capture, bool showInAttributeTable, const QString &shortTitle=QString())
 Create a new QgsAction. More...
 
QString action () const
 The action. More...
 
bool capture () const
 Whether to capture output for display when this action is run. More...
 
QIcon icon () const
 The icon. More...
 
QString iconPath () const
 The path to the icon. More...
 
QString name () const
 The name of the action. This may be a longer description. More...
 
bool runable () const
 Checks if the action is runable on the current platform. More...
 
QString shortTitle () const
 The short title is used to label user interface elements like buttons. More...
 
bool showInAttributeTable () const
 Whether this action should be shown on the attribute table. More...
 
ActionType type () const
 The action type. More...
 

Detailed Description

Utility class that encapsulates an action based on vector attributes.

Definition at line 25 of file qgsaction.h.

Member Enumeration Documentation

Enumerator
Generic 
GenericPython 
Mac 
Windows 
Unix 
OpenUrl 

Definition at line 28 of file qgsaction.h.

Constructor & Destructor Documentation

QgsAction::QgsAction ( ActionType  type,
const QString description,
const QString action,
bool  capture 
)
inline

Create a new QgsAction.

Parameters
typeThe type of this action
descriptionA human readable description string
actionThe action text. Its interpretation depends on the type
captureIf this is set to true, the output will be captured when an action is run

Definition at line 46 of file qgsaction.h.

QgsAction::QgsAction ( ActionType  type,
const QString description,
const QString action,
const QString icon,
bool  capture,
const QString shortTitle = QString() 
)
inline

Create a new QgsAction.

Parameters
typeThe type of this action
descriptionA human readable description string
actionThe action text. Its interpretation depends on the type
iconPath to an icon for this action
captureIf this is set to true, the output will be captured when an action is run
shortTitleA short string used to label user interface elements like buttons

Definition at line 65 of file qgsaction.h.

QgsAction::QgsAction ( ActionType  type,
const QString description,
const QString action,
const QString icon,
bool  capture,
bool  showInAttributeTable,
const QString shortTitle = QString() 
)
inline

Create a new QgsAction.

Parameters
typeThe type of this action
descriptionA human readable description string
actionThe action text. Its interpretation depends on the type
iconPath to an icon for this action
captureIf this is set to true, the output will be captured when an action is run
showInAttributeTableIf this is false, the action will be hidden on the attribute table action widget
shortTitleA short string used to label user interface elements like buttons

Definition at line 86 of file qgsaction.h.

Member Function Documentation

QString QgsAction::action ( ) const
inline

The action.

Definition at line 109 of file qgsaction.h.

bool QgsAction::capture ( ) const
inline

Whether to capture output for display when this action is run.

Definition at line 115 of file qgsaction.h.

QIcon QgsAction::icon ( ) const
inline

The icon.

Definition at line 106 of file qgsaction.h.

QString QgsAction::iconPath ( ) const
inline

The path to the icon.

Definition at line 103 of file qgsaction.h.

QString QgsAction::name ( ) const
inline

The name of the action. This may be a longer description.

Definition at line 97 of file qgsaction.h.

bool QgsAction::runable ( ) const

Checks if the action is runable on the current platform.

Definition at line 19 of file qgsaction.cpp.

QString QgsAction::shortTitle ( ) const
inline

The short title is used to label user interface elements like buttons.

Definition at line 100 of file qgsaction.h.

bool QgsAction::showInAttributeTable ( ) const
inline

Whether this action should be shown on the attribute table.

Definition at line 118 of file qgsaction.h.

ActionType QgsAction::type ( ) const
inline

The action type.

Definition at line 112 of file qgsaction.h.


The documentation for this class was generated from the following files: