19 #include "qgis_core.h"
65 , mDescription( description )
67 , mCaptureOutput( capture )
68 , mId( QUuid::createUuid() )
69 , mIsEnabledOnlyWhenEditable( enabledOnlyWhenEditable )
85 QgsAction(
ActionType type,
const QString &description,
const QString &action,
const QString &icon,
bool capture,
const QString &shortTitle = QString(),
const QSet<QString> &actionScopes = QSet<QString>(),
const QString ¬ificationMessage = QString(),
bool enabledOnlyWhenEditable
SIP_PYARGREMOVE =
false )
87 , mDescription( description )
88 , mShortTitle( shortTitle )
91 , mCaptureOutput( capture )
92 , mActionScopes( actionScopes )
93 , mNotificationMessage( notificationMessage )
94 , mId( QUuid::createUuid() )
95 , mIsEnabledOnlyWhenEditable( enabledOnlyWhenEditable )
112 QgsAction(
const QUuid &
id,
ActionType type,
const QString &description,
const QString &action,
const QString &icon,
bool capture,
const QString &shortTitle = QString(),
const QSet<QString> &actionScopes = QSet<QString>(),
const QString ¬ificationMessage = QString(),
bool enabledOnlyWhenEditable
SIP_PYARGREMOVE =
false )
114 , mDescription( description )
115 , mShortTitle( shortTitle )
118 , mCaptureOutput( capture )
119 , mActionScopes( actionScopes )
120 , mNotificationMessage( notificationMessage )
122 , mIsEnabledOnlyWhenEditable( enabledOnlyWhenEditable )
127 QString
name()
const {
return mDescription; }
137 QUuid
id()
const {
return mId; }
144 bool isValid()
const {
return !mId.isNull(); }
150 QIcon
icon()
const {
return QIcon( mIcon ); }
172 bool capture()
const {
return mCaptureOutput; }
187 bool runable()
const;
211 QSet<QString> actionScopes()
const;
220 void setActionScopes(
const QSet<QString> &actionScopes );
228 void readXml(
const QDomNode &actionNode );
236 void writeXml( QDomNode &actionsNode )
const;
257 QString html( )
const;
263 void setCommand(
const QString &newCommand );
267 void handleFormSubmitAction(
const QString &expandedAction )
const;
268 ActionType mType = Generic;
269 QString mDescription;
273 bool mCaptureOutput =
false;
274 QSet<QString> mActionScopes;
275 QString mNotificationMessage;
278 bool mIsEnabledOnlyWhenEditable =
false;
283 #endif // QGSACTION_H