QGIS API Documentation 3.41.0-Master (25ec5511245)
Loading...
Searching...
No Matches
qgsproperty_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsproperty_p.h
3 ---------------
4 Date : January 2017
5 Copyright : (C) 2017 by Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSPROPERTYPRIVATE_H
16#define QGSPROPERTYPRIVATE_H
17
19
20//
21// W A R N I N G
22// -------------
23//
24// This file is not part of the QGIS API. It exists purely as an
25// implementation detail. This header file may change from version to
26// version without notice, or even be removed.
27//
28
29#define SIP_NO_FILE
30
31#include <QSharedData>
32#include <QVariant>
33#include "qgsexpression.h"
35
36class QgsPropertyPrivate : public QSharedData
37{
38 public:
39
40 QgsPropertyPrivate() = default;
41
42 QgsPropertyPrivate( const QgsPropertyPrivate &other )
43 : QSharedData( other )
44 , type( other.type )
45 , active( other.active )
46 , transformer( other.transformer ? other.transformer->clone() : nullptr )
47 , staticValue( other.staticValue )
48 , fieldName( other.fieldName )
49 , cachedFieldIdx( other.cachedFieldIdx )
50 , expressionString( other.expressionString )
51 , expressionPrepared( other.expressionPrepared )
52 , expressionIsInvalid( other.expressionIsInvalid )
53 , expression( other.expression )
54 , expressionReferencedCols( other.expressionReferencedCols )
55 {}
56
57 ~QgsPropertyPrivate()
58 {
59 delete transformer;
60 }
61
63
65 bool active = true;
66
68 QgsPropertyTransformer *transformer = nullptr;
69
70 // StaticData
71 QVariant staticValue;
72
73 // FieldData
74 QString fieldName;
75 mutable int cachedFieldIdx = -1;
76
77 // ExpressionData
78 QString expressionString;
79 mutable bool expressionPrepared = false;
80 mutable bool expressionIsInvalid = false;
81 mutable QgsExpression expression;
83 mutable QSet< QString > expressionReferencedCols;
84
85 private:
86 QgsPropertyPrivate &operator=( const QgsPropertyPrivate & ) = delete;
87};
88
90
91#endif // QGSPROPERTYPRIVATE_H
PropertyType
Property types.
Definition qgis.h:646
@ Invalid
Invalid (not set) property.
Class for parsing and evaluation of expressions (formerly called "search strings").
Abstract base class for objects which transform the calculated value of a property.