QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsactionscope.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsactionscope.h - QgsActionScope
3
4 ---------------------
5 begin : 1.11.2016
6 copyright : (C) 2016 by Matthias Kuhn
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#ifndef QGSACTIONSCOPE_H
17#define QGSACTIONSCOPE_H
18
19#include "qgis_core.h"
21
22#include <QString>
23
49class CORE_EXPORT QgsActionScope
50{
51 public:
52#ifdef SIP_RUN
53 % TypeCode
54#include <QHash>
55 % End
56#endif
57
62 explicit QgsActionScope();
63
69 explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() );
70
71 bool operator==( const QgsActionScope &other ) const;
72
83
94
100 QString id() const;
101
107 void setId( const QString &id );
108
117 QString title() const;
118
127 void setTitle( const QString &title );
128
138 QString description() const;
139
149 void setDescription( const QString &description );
150
154 bool isValid() const;
155#ifdef SIP_RUN
156 long __hash__();
157 % MethodCode
158 sipRes = qHash( *sipCpp );
159 % End
160#endif
161
162 private:
163 QString mId;
164 QString mTitle;
165 QString mDescription;
166 QgsExpressionContextScope mExpressionContextScope;
167};
168
169CORE_EXPORT uint qHash( const QgsActionScope &key, uint seed = 0 ) SIP_SKIP;
170
171#endif // QGSACTIONSCOPE_H
An action scope defines a "place" for an action to be shown and may add additional expression variabl...
QgsActionScope()
Creates a new invalid action scope.
void setTitle(const QString &title)
Sets the action scope's title.
QString description() const
Returns the action scope's description.
void setDescription(const QString &description)
Sets the action scope's description.
QgsExpressionContextScope expressionContextScope() const
Returns the expression context scope for the action scope.
QString id() const
Returns the unique identifier for this action scope.
void setId(const QString &id)
Sets the unique id for this action scope.
QString title() const
Returns the action scope's title.
bool isValid() const
Returns true if this scope is valid.
void setExpressionContextScope(const QgsExpressionContextScope &expressionContextScope)
Sets the expression context scope for the action scope.
Single scope for storing variables and functions for use within a QgsExpressionContext.
uint qHash(const QVariant &variant)
Hash for QVariant.
Definition qgis.cpp:603
#define SIP_SKIP
Definition qgis_sip.h:134
CORE_EXPORT uint qHash(const QgsActionScope &key, uint seed=0)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)