QGIS API Documentation 3.39.0-Master (3aed037ce22)
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"
20#include <QString>
22
46class CORE_EXPORT QgsActionScope
47{
48 public:
49#ifdef SIP_RUN
50 % TypeCode
51#include <QHash>
52 % End
53#endif
54
59 explicit QgsActionScope();
60
66 explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() );
67
68 bool operator==( const QgsActionScope &other ) const;
69
76 QgsExpressionContextScope expressionContextScope() const;
77
81 void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope );
82
87 QString id() const;
88
90 void setId( const QString &id );
91
97 QString title() const;
99 void setTitle( const QString &title );
100
107 QString description() const;
109 void setDescription( const QString &description );
110
115 bool isValid() const;
116#ifdef SIP_RUN
117 long __hash__();
118 % MethodCode
119 sipRes = qHash( *sipCpp );
120 % End
121#endif
122
123 private:
124 QString mId;
125 QString mTitle;
126 QString mDescription;
127 QgsExpressionContextScope mExpressionContextScope;
128};
129
130CORE_EXPORT uint qHash( const QgsActionScope &key, uint seed = 0 ) SIP_SKIP;
131
132#endif // QGSACTIONSCOPE_H
An action scope defines a "place" for an action to be shown and may add additional expression variabl...
Single scope for storing variables and functions for use within a QgsExpressionContext.
uint qHash(const QVariant &variant)
Hash for QVariant.
Definition qgis.cpp:198
#define SIP_SKIP
Definition qgis_sip.h:126
CORE_EXPORT uint qHash(const QgsActionScope &key, uint seed=0)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)