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

Additional Inherited Members

- Protected Attributes inherited from QgsFieldDomain
QString mDescription
 
QVariant::Type mFieldType = QVariant::Type::String
 
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 289 of file qgsfielddomain.h.

Constructor & Destructor Documentation

◆ QgsRangeFieldDomain() [1/2]

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.

Definition at line 79 of file qgsfielddomain.cpp.

◆ QgsRangeFieldDomain() [2/2]

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 99 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 362 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 380 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 326 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 344 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 372 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 388 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 336 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 352 of file qgsfielddomain.h.

◆ type()

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

Returns the type of field domain.

Implements QgsFieldDomain.

Definition at line 89 of file qgsfielddomain.cpp.

◆ typeName()

QString QgsRangeFieldDomain::typeName ( ) const
overridevirtual

Returns a translated name of the field domain type.

Implements QgsFieldDomain.

Definition at line 94 of file qgsfielddomain.cpp.


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