QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
Public Member Functions | List of all members
QgsSnappingConfig::IndividualLayerSettings Class Reference

This is a container of advanced configuration (per layer) of the snapping of the project. More...

#include <qgssnappingconfig.h>

Public Member Functions

 IndividualLayerSettings ()=default
 Constructs an invalid setting. More...
 
 IndividualLayerSettings (bool enabled, Qgis::SnappingTypes type, double tolerance, Qgis::MapToolUnit units, double minScale=0.0, double maxScale=0.0)
 IndividualLayerSettings. More...
 
Q_DECL_DEPRECATED IndividualLayerSettings (bool enabled, SnappingType type, double tolerance, Qgis::MapToolUnit units)
 IndividualLayerSettings. More...
 
bool enabled () const
 Returns if snapping is enabled. More...
 
double maximumScale () const
 Returns max scale on which snapping is limited. More...
 
double minimumScale () const
 Returns minimum scale on which snapping is limited. More...
 
bool operator!= (const QgsSnappingConfig::IndividualLayerSettings &other) const
 Compare this configuration to other. More...
 
bool operator== (const QgsSnappingConfig::IndividualLayerSettings &other) const
 
void setEnabled (bool enabled)
 enables the snapping More...
 
void setMaximumScale (double maxScale)
 Sets the max scale value on which snapping is used, 0.0 disable scale limit. More...
 
void setMinimumScale (double minScale)
 Sets the min scale value on which snapping is used, 0.0 disable scale limit. More...
 
void setTolerance (double tolerance)
 Sets the tolerance. More...
 
Q_DECL_DEPRECATED void setType (SnappingType type)
 define the type of snapping More...
 
void setTypeFlag (Qgis::SnappingTypes type)
 define the type of snapping More...
 
void setUnits (Qgis::MapToolUnit units)
 Sets the type of units. More...
 
double tolerance () const
 Returns the tolerance. More...
 
Q_DECL_DEPRECATED QgsSnappingConfig::SnappingType type () const
 Returns the flags type (vertices | segments | area | centroid | middle) More...
 
Qgis::SnappingTypes typeFlag () const
 Returns the flags type (vertices | segments | area | centroid | middle) More...
 
Qgis::MapToolUnit units () const
 Returns the type of units. More...
 
bool valid () const
 Returns if settings are valid. More...
 

Detailed Description

This is a container of advanced configuration (per layer) of the snapping of the project.

Since
QGIS 3.0

Definition at line 107 of file qgssnappingconfig.h.

Constructor & Destructor Documentation

◆ IndividualLayerSettings() [1/3]

QgsSnappingConfig::IndividualLayerSettings::IndividualLayerSettings ( bool  enabled,
SnappingType  type,
double  tolerance,
Qgis::MapToolUnit  units 
)

IndividualLayerSettings.

Parameters
enabled
type
tolerance
units
Deprecated:
since QGIS 3.12 use the method with Qgis::SnappingTypes instead.

Definition at line 40 of file qgssnappingconfig.cpp.

◆ IndividualLayerSettings() [2/3]

QgsSnappingConfig::IndividualLayerSettings::IndividualLayerSettings ( bool  enabled,
Qgis::SnappingTypes  type,
double  tolerance,
Qgis::MapToolUnit  units,
double  minScale = 0.0,
double  maxScale = 0.0 
)

IndividualLayerSettings.

Parameters
enabled
type
tolerance
units
minScale0.0 disable scale limit
maxScale0.0 disable scale limit
Since
QGIS 3.12

Definition at line 30 of file qgssnappingconfig.cpp.

◆ IndividualLayerSettings() [3/3]

QgsSnappingConfig::IndividualLayerSettings::IndividualLayerSettings ( )
default

Constructs an invalid setting.

Member Function Documentation

◆ enabled()

bool QgsSnappingConfig::IndividualLayerSettings::enabled ( ) const

Returns if snapping is enabled.

Definition at line 56 of file qgssnappingconfig.cpp.

◆ maximumScale()

double QgsSnappingConfig::IndividualLayerSettings::maximumScale ( ) const

Returns max scale on which snapping is limited.

Since
QGIS 3.14

Definition at line 136 of file qgssnappingconfig.cpp.

◆ minimumScale()

double QgsSnappingConfig::IndividualLayerSettings::minimumScale ( ) const

Returns minimum scale on which snapping is limited.

Since
QGIS 3.14

Definition at line 126 of file qgssnappingconfig.cpp.

◆ operator!=()

bool QgsSnappingConfig::IndividualLayerSettings::operator!= ( const QgsSnappingConfig::IndividualLayerSettings other) const

Compare this configuration to other.

Definition at line 146 of file qgssnappingconfig.cpp.

◆ operator==()

bool QgsSnappingConfig::IndividualLayerSettings::operator== ( const QgsSnappingConfig::IndividualLayerSettings other) const

Definition at line 157 of file qgssnappingconfig.cpp.

◆ setEnabled()

void QgsSnappingConfig::IndividualLayerSettings::setEnabled ( bool  enabled)

enables the snapping

Definition at line 61 of file qgssnappingconfig.cpp.

◆ setMaximumScale()

void QgsSnappingConfig::IndividualLayerSettings::setMaximumScale ( double  maxScale)

Sets the max scale value on which snapping is used, 0.0 disable scale limit.

Since
QGIS 3.14

Definition at line 141 of file qgssnappingconfig.cpp.

◆ setMinimumScale()

void QgsSnappingConfig::IndividualLayerSettings::setMinimumScale ( double  minScale)

Sets the min scale value on which snapping is used, 0.0 disable scale limit.

Since
QGIS 3.14

Definition at line 131 of file qgssnappingconfig.cpp.

◆ setTolerance()

void QgsSnappingConfig::IndividualLayerSettings::setTolerance ( double  tolerance)

Sets the tolerance.

Definition at line 111 of file qgssnappingconfig.cpp.

◆ setType()

void QgsSnappingConfig::IndividualLayerSettings::setType ( QgsSnappingConfig::SnappingType  type)

define the type of snapping

Deprecated:
since QGIS 3.12 use setTypeFlag instead.

Definition at line 83 of file qgssnappingconfig.cpp.

◆ setTypeFlag()

void QgsSnappingConfig::IndividualLayerSettings::setTypeFlag ( Qgis::SnappingTypes  type)

define the type of snapping

Since
QGIS 3.12

Definition at line 101 of file qgssnappingconfig.cpp.

◆ setUnits()

void QgsSnappingConfig::IndividualLayerSettings::setUnits ( Qgis::MapToolUnit  units)

Sets the type of units.

Definition at line 121 of file qgssnappingconfig.cpp.

◆ tolerance()

double QgsSnappingConfig::IndividualLayerSettings::tolerance ( ) const

Returns the tolerance.

Definition at line 106 of file qgssnappingconfig.cpp.

◆ type()

QgsSnappingConfig::SnappingType QgsSnappingConfig::IndividualLayerSettings::type ( ) const

Returns the flags type (vertices | segments | area | centroid | middle)

Deprecated:
since QGIS 3.12 use typeFlag instead.

Definition at line 71 of file qgssnappingconfig.cpp.

◆ typeFlag()

Qgis::SnappingTypes QgsSnappingConfig::IndividualLayerSettings::typeFlag ( ) const

Returns the flags type (vertices | segments | area | centroid | middle)

Since
QGIS 3.12

Definition at line 66 of file qgssnappingconfig.cpp.

◆ units()

Qgis::MapToolUnit QgsSnappingConfig::IndividualLayerSettings::units ( ) const

Returns the type of units.

Definition at line 116 of file qgssnappingconfig.cpp.

◆ valid()

bool QgsSnappingConfig::IndividualLayerSettings::valid ( ) const

Returns if settings are valid.

Definition at line 51 of file qgssnappingconfig.cpp.


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