QGIS API Documentation  3.8.0-Zanzibar (11aff65)
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 
55  explicit QgsActionScope();
56 
62  explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() );
63 
67  bool operator==( const QgsActionScope &other ) const;
68 
76  QgsExpressionContextScope expressionContextScope() const;
77 
81  void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope );
82 
88  QString id() const;
89 
91  void setId( const QString &id );
92 
99  QString title() const;
101  void setTitle( const QString &title );
102 
110  QString description() const;
112  void setDescription( const QString &description );
113 
119  bool isValid() const;
120 
121  private:
122  QString mId;
123  QString mTitle;
124  QString mDescription;
125  QgsExpressionContextScope mExpressionContextScope;
126 };
127 
128 CORE_EXPORT uint qHash( const QgsActionScope &key, uint seed = 0 ) SIP_SKIP;
129 
130 #endif // QGSACTIONSCOPE_H
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
An action scope defines a "place" for an action to be shown and may add additional expression variabl...
#define SIP_SKIP
Definition: qgis_sip.h:119
void seed(uint32_t value)
Single scope for storing variables and functions for use within a QgsExpressionContext.
CORE_EXPORT uint qHash(const QgsActionScope &key, uint seed=0)