QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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 // clang-format off
54 % TypeCode
55#include <QHash>
56 % End
57// clang-format on
58#endif
59
64 explicit QgsActionScope();
65
71 explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() );
72
73 bool operator==( const QgsActionScope &other ) const;
74
85
96
102 QString id() const;
103
109 void setId( const QString &id );
110
119 QString title() const;
120
129 void setTitle( const QString &title );
130
140 QString description() const;
141
151 void setDescription( const QString &description );
152
156 bool isValid() const;
157
158 // clang-format off
159#ifdef SIP_RUN
160 long __hash__();
161 % MethodCode
162 sipRes = qHash( *sipCpp );
163 % End
164#endif
165
166 private:
167 // clang-format on
168 QString mId;
169 QString mTitle;
170 QString mDescription;
171 QgsExpressionContextScope mExpressionContextScope;
172};
173
174CORE_EXPORT uint qHash( const QgsActionScope &key, uint seed = 0 ) SIP_SKIP;
175
176#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:611
#define SIP_SKIP
Definition qgis_sip.h:133
CORE_EXPORT uint qHash(const QgsActionScope &key, uint seed=0)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)