16#ifndef QGSFIELD_PRIVATE_H
17#define QGSFIELD_PRIVATE_H
49class QgsFieldPrivate :
public QSharedData
53 QgsFieldPrivate(
const QString &name = QString(),
54 QMetaType::Type type = QMetaType::Type::UnknownType,
55 QMetaType::Type subType = QMetaType::Type::UnknownType,
56 const QString &typeName = QString(),
59 const QString &comment = QString(),
60 const QMap< int, QVariant > &metadata = QMap< int, QVariant >() )
64 , typeName( typeName )
68 , metadata( metadata )
72 QgsFieldPrivate(
const QgsFieldPrivate &other )
73 : QSharedData( other )
76 , subType( other.subType )
77 , typeName( other.typeName )
78 , length( other.length )
79 , precision( other.precision )
80 , comment( other.comment )
81 , metadata( other.metadata )
82 , alias( other.alias )
83 , flags( other.flags )
84 , defaultValueDefinition( other.defaultValueDefinition )
85 , constraints( other.constraints )
86 , editorWidgetSetup( other.editorWidgetSetup )
87 , splitPolicy( other.splitPolicy )
88 , duplicatePolicy( other.duplicatePolicy )
89 , mergePolicy( other.mergePolicy )
90 , isReadOnly( other.isReadOnly )
94 ~QgsFieldPrivate() =
default;
97 bool operator==(
const QgsFieldPrivate &other )
const
99 return ( ( name == other.name ) && ( type == other.type ) && ( subType == other.subType )
100 && ( length == other.length ) && ( precision == other.precision )
101 && ( metadata == other.metadata )
102 && ( alias == other.alias ) && ( defaultValueDefinition == other.defaultValueDefinition )
103 && ( constraints == other.constraints ) && ( flags == other.flags )
104 && ( splitPolicy == other.splitPolicy )
105 && ( duplicatePolicy == other.duplicatePolicy )
106 && ( mergePolicy == other.mergePolicy )
107 && ( isReadOnly == other.isReadOnly )
108 && ( editorWidgetSetup == other.editorWidgetSetup ) );
115 QMetaType::Type type;
118 QMetaType::Type subType;
133 QMap< int, QVariant > metadata;
142 QgsDefaultValue defaultValueDefinition;
145 QgsFieldConstraints constraints;
147 QgsEditorWidgetSetup editorWidgetSetup;
159 bool isReadOnly =
false;
162 QgsFieldPrivate &operator=(
const QgsFieldPrivate & ) =
delete;
FieldDomainMergePolicy
Merge policy for field domains.
@ UnsetField
Clears the field value so that the data provider backend will populate using any backend triggers or ...
FieldDomainSplitPolicy
Split policy for field domains.
@ Duplicate
Duplicate original value.
FieldDuplicatePolicy
Duplicate policy for fields.
@ Duplicate
Duplicate original value.
@ NoFlag
No flag is defined.
QFlags< FieldConfigurationFlag > FieldConfigurationFlags
Configuration flags for fields These flags are meant to be user-configurable and are not describing a...
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)