QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsRangeFieldDomain Class Reference

Definition of a numeric field domain with a range of validity for values. More...

#include <qgsfielddomain.h>

Inheritance diagram for QgsRangeFieldDomain:
Inheritance graph
[legend]

Public Member Functions

 QgsRangeFieldDomain (const QgsRangeFieldDomain &)=delete
 QgsRangeFieldDomain cannot be copied - use clone() instead.
 
 QgsRangeFieldDomain (const QString &name, const QString &description, QMetaType::Type fieldType, const QVariant &minimum, bool minimumIsInclusive, const QVariant &maximum, bool maximumIsInclusive)
 Constructor for QgsRangeFieldDomain, with the specified name, description and fieldType.
 
Q_DECL_DEPRECATED 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.
 
QgsRangeFieldDomainclone () const override
 Clones the field domain.
 
QVariant maximum () const
 Returns the maximum value.
 
bool maximumIsInclusive () const
 Returns true if the maximum value is inclusive.
 
QVariant minimum () const
 Returns the minimum value.
 
bool minimumIsInclusive () const
 Returns true if the minimum value is inclusive.
 
QgsRangeFieldDomainoperator= (const QgsRangeFieldDomain &)=delete
 QgsRangeFieldDomain cannot be copied - use clone() instead.
 
void setMaximum (const QVariant &maximum)
 Sets the maximum allowed value.
 
void setMaximumIsInclusive (bool inclusive)
 Sets whether the maximum value is inclusive.
 
void setMinimum (const QVariant &minimum)
 Sets the minimum allowed value.
 
void setMinimumIsInclusive (bool inclusive)
 Sets whether the minimum value is inclusive.
 
Qgis::FieldDomainType type () const override
 Returns the type of field domain.
 
QString typeName () const override
 Returns a translated name of the field domain type.
 
- Public Member Functions inherited from QgsFieldDomain
 QgsFieldDomain (const QString &name, const QString &description, QMetaType::Type fieldType)
 Constructor for QgsFieldDomain, with the specified name, description and fieldType.
 
Q_DECL_DEPRECATED QgsFieldDomain (const QString &name, const QString &description, QVariant::Type fieldType)
 Constructor for QgsFieldDomain, with the specified name, description and fieldType.
 
virtual ~QgsFieldDomain ()
 
QString description () const
 Returns the description of the field domain.
 
QMetaType::Type fieldType () const
 Returns the associated field type.
 
Qgis::FieldDomainMergePolicy mergePolicy () const
 Returns the merge policy.
 
QString name () const
 Returns the name of the field domain.
 
void setDescription (const QString &description)
 Sets the description of the field domain.
 
void setFieldType (QMetaType::Type type)
 Sets the associated field type.
 
Q_DECL_DEPRECATED void setFieldType (QVariant::Type type)
 Sets the associated field type.
 
void setMergePolicy (Qgis::FieldDomainMergePolicy policy)
 Sets the merge policy.
 
void setName (const QString &name)
 Sets the name of the field domain.
 
void setSplitPolicy (Qgis::FieldDomainSplitPolicy policy)
 Sets the split policy.
 
Qgis::FieldDomainSplitPolicy splitPolicy () const
 Returns the split policy.
 

Additional Inherited Members

- Protected Attributes inherited from QgsFieldDomain
QString mDescription
 
QMetaType::Type mFieldType = QMetaType::Type::QString
 
Qgis::FieldDomainMergePolicy mMergePolicy = Qgis::FieldDomainMergePolicy::DefaultValue
 
QString mName
 
Qgis::FieldDomainSplitPolicy mSplitPolicy = Qgis::FieldDomainSplitPolicy::DefaultValue
 

Detailed Description

Definition of a numeric field domain with a range of validity for values.

Since
QGIS 3.26

Definition at line 317 of file qgsfielddomain.h.

Constructor & Destructor Documentation

◆ QgsRangeFieldDomain() [1/3]

QgsRangeFieldDomain::QgsRangeFieldDomain ( const QString &  name,
const QString &  description,
QMetaType::Type  fieldType,
const QVariant &  minimum,
bool  minimumIsInclusive,
const QVariant &  maximum,
bool  maximumIsInclusive 
)

Constructor for QgsRangeFieldDomain, with the specified name, description and fieldType.

Set an invalid QVariant for minimum or maximum respectively if no minimum or maximum value is desired.

Definition at line 98 of file qgsfielddomain.cpp.

◆ QgsRangeFieldDomain() [2/3]

QgsRangeFieldDomain::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.

Set an invalid QVariant for minimum or maximum respectively if no minimum or maximum value is desired.

Deprecated:
QGIS 3.38. Use the method with a QMetaType::Type argument instead.

Definition at line 108 of file qgsfielddomain.cpp.

◆ QgsRangeFieldDomain() [3/3]

QgsRangeFieldDomain::QgsRangeFieldDomain ( const QgsRangeFieldDomain )
delete

QgsRangeFieldDomain cannot be copied - use clone() instead.

Member Function Documentation

◆ clone()

QgsRangeFieldDomain * QgsRangeFieldDomain::clone ( ) const
overridevirtual

Clones the field domain.

Implements QgsFieldDomain.

Definition at line 123 of file qgsfielddomain.cpp.

◆ maximum()

QVariant QgsRangeFieldDomain::maximum ( ) const
inline

Returns the maximum value.

If no maximum value is set then an invalid variant will be returned.

See also
maximumIsInclusive()
setMaximum()

Definition at line 405 of file qgsfielddomain.h.

◆ maximumIsInclusive()

bool QgsRangeFieldDomain::maximumIsInclusive ( ) const
inline

Returns true if the maximum value is inclusive.

See also
maximum()
setMaximumIsInclusive()

Definition at line 423 of file qgsfielddomain.h.

◆ minimum()

QVariant QgsRangeFieldDomain::minimum ( ) const
inline

Returns the minimum value.

If no minimum value is set then an invalid variant will be returned.

See also
minimumIsInclusive()
setMinimum()

Definition at line 369 of file qgsfielddomain.h.

◆ minimumIsInclusive()

bool QgsRangeFieldDomain::minimumIsInclusive ( ) const
inline

Returns true if the minimum value is inclusive.

See also
minimum()
setMinimumIsInclusive()

Definition at line 387 of file qgsfielddomain.h.

◆ operator=()

QgsRangeFieldDomain & QgsRangeFieldDomain::operator= ( const QgsRangeFieldDomain )
delete

QgsRangeFieldDomain cannot be copied - use clone() instead.

◆ setMaximum()

void QgsRangeFieldDomain::setMaximum ( const QVariant &  maximum)
inline

Sets the maximum allowed value.

If no maximum value is desired then an invalid variant should be set.

See also
setMaximumIsInclusive()
maximum()

Definition at line 415 of file qgsfielddomain.h.

◆ setMaximumIsInclusive()

void QgsRangeFieldDomain::setMaximumIsInclusive ( bool  inclusive)
inline

Sets whether the maximum value is inclusive.

See also
setMaximum()
maximumIsInclusive()

Definition at line 431 of file qgsfielddomain.h.

◆ setMinimum()

void QgsRangeFieldDomain::setMinimum ( const QVariant &  minimum)
inline

Sets the minimum allowed value.

If no minimum value is desired then an invalid variant should be set.

See also
setMinimumIsInclusive()
minimum()

Definition at line 379 of file qgsfielddomain.h.

◆ setMinimumIsInclusive()

void QgsRangeFieldDomain::setMinimumIsInclusive ( bool  inclusive)
inline

Sets whether the minimum value is inclusive.

See also
setMinimum()
minimumIsInclusive()

Definition at line 395 of file qgsfielddomain.h.

◆ type()

Qgis::FieldDomainType QgsRangeFieldDomain::type ( ) const
overridevirtual

Returns the type of field domain.

Implements QgsFieldDomain.

Definition at line 113 of file qgsfielddomain.cpp.

◆ typeName()

QString QgsRangeFieldDomain::typeName ( ) const
overridevirtual

Returns a translated name of the field domain type.

Implements QgsFieldDomain.

Definition at line 118 of file qgsfielddomain.cpp.


The documentation for this class was generated from the following files: