QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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
30#include "qgsexpression.h"
32
33#include <QSharedData>
34#include <QVariant>
35
36#define SIP_NO_FILE
37
38class QgsPropertyPrivate : public QSharedData
39{
40 public:
41 QgsPropertyPrivate() = default;
42
43 QgsPropertyPrivate( const QgsPropertyPrivate &other )
44 : QSharedData( other )
45 , type( other.type )
46 , active( other.active )
47 , transformer( other.transformer ? other.transformer->clone() : nullptr )
48 , staticValue( other.staticValue )
49 , fieldName( other.fieldName )
50 , cachedFieldIdx( other.cachedFieldIdx )
51 , expressionString( other.expressionString )
52 , expressionPrepared( other.expressionPrepared )
53 , expressionIsInvalid( other.expressionIsInvalid )
54 , expression( other.expression )
55 , expressionReferencedCols( other.expressionReferencedCols )
56 {}
57
58 ~QgsPropertyPrivate() { delete transformer; }
59
61
63 bool active = true;
64
66 QgsPropertyTransformer *transformer = nullptr;
67
68 // StaticData
69 QVariant staticValue;
70
71 // FieldData
72 QString fieldName;
73 mutable int cachedFieldIdx = -1;
74
75 // ExpressionData
76 QString expressionString;
77 mutable bool expressionPrepared = false;
78 mutable bool expressionIsInvalid = false;
79 mutable QgsExpression expression;
81 mutable QSet< QString > expressionReferencedCols;
82
83 private:
84 QgsPropertyPrivate &operator=( const QgsPropertyPrivate & ) = delete;
85};
86
88
89#endif // QGSPROPERTYPRIVATE_H
PropertyType
Property types.
Definition qgis.h:708
@ Invalid
Invalid (not set) property.
Definition qgis.h:709