QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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
7  email : [email protected]
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>
21 #include "qgsexpressioncontext.h"
22 
46 class CORE_EXPORT QgsActionScope
47 {
48  public:
49 #ifdef SIP_RUN
50  % TypeCode
51 #include <QHash>
52  % End
53 #endif
54 
60  explicit QgsActionScope();
61 
67  explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() );
68 
72  bool operator==( const QgsActionScope &other ) const;
73 
81  QgsExpressionContextScope expressionContextScope() const;
82 
86  void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope );
87 
93  QString id() const;
94 
96  void setId( const QString &id );
97 
104  QString title() const;
106  void setTitle( const QString &title );
107 
115  QString description() const;
117  void setDescription( const QString &description );
118 
124  bool isValid() const;
125 #ifdef SIP_RUN
126  long __hash__();
127  % MethodCode
128  sipRes = qHash( *sipCpp );
129  % End
130 #endif
131 
132  private:
133  QString mId;
134  QString mTitle;
135  QString mDescription;
136  QgsExpressionContextScope mExpressionContextScope;
137 };
138 
139 CORE_EXPORT uint qHash( const QgsActionScope &key, uint seed = 0 ) SIP_SKIP;
140 
141 #endif // QGSACTIONSCOPE_H
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition: qgsfeatureiterator.h:400
qgsexpressioncontext.h
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
qHash
CORE_EXPORT uint qHash(const QgsActionScope &key, uint seed=0)
Definition: qgsactionscope.cpp:82
QgsExpressionContextScope
Single scope for storing variables and functions for use within a QgsExpressionContext.
Definition: qgsexpressioncontext.h:112
QgsActionScope
An action scope defines a "place" for an action to be shown and may add additional expression variabl...
Definition: qgsactionscope.h:47