25 , mDescription( description )
26 , mFieldType( fieldType )
38 return other.mCode == mCode && other.mValue == mValue;
43 return !( *
this == other );
64 return QObject::tr(
"Coded Values" );
79QgsRangeFieldDomain::QgsRangeFieldDomain(
const QString &name,
const QString &description, QVariant::Type fieldType,
const QVariant &minimum,
bool minimumIsInclusive,
const QVariant &maximum,
bool maximumIsInclusive )
83 , mMinIsInclusive( minimumIsInclusive )
84 , mMaxIsInclusive( maximumIsInclusive )
96 return QObject::tr(
"Range" );
101 std::unique_ptr< QgsRangeFieldDomain > res = std::make_unique< QgsRangeFieldDomain >(
mName,
mDescription,
mFieldType, mMin, mMinIsInclusive, mMax, mMaxIsInclusive );
104 return res.release();
126 return QObject::tr(
"Glob" );
134 return res.release();
FieldDomainType
Types of field domain.
@ Coded
Coded field domain.
@ Range
Numeric range field domain (min/max)
@ Glob
Glob string pattern field domain.
Definition of a coded / enumerated field domain.
QgsCodedFieldDomain * clone() const override
Clones the field domain.
Qgis::FieldDomainType type() const override
Returns the type of field domain.
QgsCodedFieldDomain(const QString &name, const QString &description, QVariant::Type fieldType, const QList< QgsCodedValue > &values)
Constructor for QgsCodedFieldDomain, with the associated name, description and fieldType.
QString typeName() const override
Returns a translated name of the field domain type.
Associates a code and a value.
bool operator==(const QgsCodedValue &other) const
bool operator!=(const QgsCodedValue &other) const
Base class for field domains.
Qgis::FieldDomainSplitPolicy mSplitPolicy
virtual ~QgsFieldDomain()
QgsFieldDomain(const QString &name, const QString &description, QVariant::Type fieldType)
Constructor for QgsFieldDomain, with the specified name, description and fieldType.
Qgis::FieldDomainMergePolicy mMergePolicy
QVariant::Type mFieldType
Definition of a field domain for field content validated by a glob.
QString typeName() const override
Returns a translated name of the field domain type.
QgsGlobFieldDomain(const QString &name, const QString &description, QVariant::Type fieldType, const QString &glob)
Constructor for QgsGlobFieldDomain, with the specified name, description and fieldType.
QgsGlobFieldDomain * clone() const override
Clones the field domain.
Qgis::FieldDomainType type() const override
Returns the type of field domain.
Definition of a numeric field domain with a range of validity for values.
Qgis::FieldDomainType type() const override
Returns the type of field domain.
QgsRangeFieldDomain * clone() const override
Clones the field domain.
QgsRangeFieldDomain(const QString &name, const QString &description, QVariant::Type fieldType, const QVariant &minimum, bool minimumIsInclusive, const QVariant &maximum, bool maximumIsInclusive)
Constructor for QgsRangeFieldDomain, with the specified name, description and fieldType.
QString typeName() const override
Returns a translated name of the field domain type.