2017-05-18 07:50:23 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgssnappingconfig.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-26 15:36:07 +02:00
|
|
|
class QgsSnappingConfig
|
|
|
|
{
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
This is a container for configuration of the snapping of the project
|
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2016-08-26 15:36:07 +02:00
|
|
|
%TypeHeaderCode
|
2017-05-18 07:50:23 +02:00
|
|
|
#include "qgssnappingconfig.h"
|
2016-08-26 15:36:07 +02:00
|
|
|
%End
|
2018-05-15 17:37:18 -04:00
|
|
|
public:
|
|
|
|
static const QMetaObject staticMetaObject;
|
|
|
|
|
2016-08-26 15:36:07 +02:00
|
|
|
public:
|
2017-05-18 07:50:23 +02:00
|
|
|
|
2016-08-26 15:36:07 +02:00
|
|
|
enum SnappingMode
|
|
|
|
{
|
2017-05-18 07:50:23 +02:00
|
|
|
ActiveLayer,
|
|
|
|
AllLayers,
|
|
|
|
AdvancedConfiguration,
|
2016-08-26 15:36:07 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum SnappingType
|
|
|
|
{
|
2017-05-18 07:50:23 +02:00
|
|
|
Vertex,
|
|
|
|
VertexAndSegment,
|
|
|
|
Segment,
|
2016-08-26 15:36:07 +02:00
|
|
|
};
|
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
enum SnappingTypes
|
|
|
|
{
|
|
|
|
NoSnapFlag,
|
|
|
|
VertexFlag,
|
|
|
|
SegmentFlag,
|
|
|
|
AreaFlag,
|
|
|
|
CentroidFlag,
|
|
|
|
MiddleOfSegmentFlag,
|
|
|
|
};
|
|
|
|
typedef QFlags<QgsSnappingConfig::SnappingTypes> SnappingTypeFlag;
|
|
|
|
|
|
|
|
|
2020-03-30 17:32:24 +02:00
|
|
|
enum ScaleDependencyMode
|
|
|
|
{
|
|
|
|
Disabled,
|
2020-04-01 09:44:31 +02:00
|
|
|
Global,
|
|
|
|
PerLayer
|
2020-03-30 17:32:24 +02:00
|
|
|
};
|
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
static const QString snappingTypeFlagToString( SnappingTypeFlag type );
|
|
|
|
%Docstring
|
|
|
|
Convenient method to returns the translated name of the enum type
|
|
|
|
QgsSnappingConfig.SnappingTypeFlag
|
|
|
|
|
|
|
|
.. versionadded:: 3.12
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
2016-08-26 15:36:07 +02:00
|
|
|
class IndividualLayerSettings
|
2017-05-18 07:50:23 +02:00
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
This is a container of advanced configuration (per layer) of the snapping of the project
|
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgssnappingconfig.h"
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
public:
|
2017-05-18 07:50:23 +02:00
|
|
|
|
2020-03-25 15:59:28 +01:00
|
|
|
IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units ) /Deprecated/;
|
2020-03-02 09:02:35 +01:00
|
|
|
%Docstring
|
|
|
|
IndividualLayerSettings
|
|
|
|
|
|
|
|
:param enabled:
|
|
|
|
:param type:
|
|
|
|
:param tolerance:
|
|
|
|
:param units:
|
|
|
|
|
|
|
|
.. deprecated:: QGIS 3.12
|
|
|
|
use the method with SnappingTypeFlag instead.
|
|
|
|
%End
|
|
|
|
|
2020-04-06 11:40:21 +02:00
|
|
|
IndividualLayerSettings( bool enabled, SnappingTypeFlag type, double tolerance, QgsTolerance::UnitType units, double minScale = 0.0, double maxScale = 0.0 );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
IndividualLayerSettings
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param enabled:
|
|
|
|
:param type:
|
|
|
|
:param tolerance:
|
|
|
|
:param units:
|
2020-03-18 09:22:49 +01:00
|
|
|
:param minScale: 0.0 disable scale limit
|
|
|
|
:param maxScale: 0.0 disable scale limit
|
2020-03-17 16:02:21 +01:00
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
.. versionadded:: 3.12
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
IndividualLayerSettings();
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructs an invalid setting
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
bool valid() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns if settings are valid
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
bool enabled() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns if snapping is enabled
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setEnabled( bool enabled );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
|
|
|
enables the snapping
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
QgsSnappingConfig::SnappingTypeFlag typeFlag() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the flags type (vertices | segments | area | centroid | middle)
|
|
|
|
|
|
|
|
.. versionadded:: 3.12
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsSnappingConfig::SnappingType type() const /Deprecated/;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2020-03-02 09:02:35 +01:00
|
|
|
Returns the flags type (vertices | segments | area | centroid | middle)
|
|
|
|
|
|
|
|
.. deprecated:: QGIS 3.12
|
|
|
|
use typeFlag instead.
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
void setType( QgsSnappingConfig::SnappingType type ) /Deprecated/;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
|
|
|
define the type of snapping
|
2020-03-02 09:02:35 +01:00
|
|
|
|
|
|
|
.. deprecated:: QGIS 3.12
|
|
|
|
use setTypeFlag instead.
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setTypeFlag( QgsSnappingConfig::SnappingTypeFlag type );
|
|
|
|
%Docstring
|
|
|
|
define the type of snapping
|
|
|
|
|
|
|
|
.. versionadded:: 3.12
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
double tolerance() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the tolerance
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setTolerance( double tolerance );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets the tolerance
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
QgsTolerance::UnitType units() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the type of units
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setUnits( QgsTolerance::UnitType units );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets the type of units
|
2020-02-26 17:12:54 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 11:40:21 +02:00
|
|
|
double minimumScale() const;
|
2020-02-26 17:12:54 +01:00
|
|
|
%Docstring
|
2020-04-06 15:02:13 +02:00
|
|
|
Returns minimum scale on which snapping is limited
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-02-26 17:12:54 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 16:12:26 +02:00
|
|
|
void setMinimumScale( double minScale );
|
2020-02-26 17:12:54 +01:00
|
|
|
%Docstring
|
2020-03-18 09:22:49 +01:00
|
|
|
Sets the min scale value on which snapping is used, 0.0 disable scale limit
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-02-26 17:12:54 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 11:40:21 +02:00
|
|
|
double maximumScale() const;
|
2020-02-26 17:12:54 +01:00
|
|
|
%Docstring
|
2020-03-30 17:32:24 +02:00
|
|
|
Returns max scale on which snapping is limited
|
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-02-26 17:12:54 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 16:12:26 +02:00
|
|
|
void setMaximumScale( double maxScale );
|
2020-02-26 17:12:54 +01:00
|
|
|
%Docstring
|
2020-03-18 09:22:49 +01:00
|
|
|
Sets the max scale value on which snapping is used, 0.0 disable scale limit
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool operator!= ( const QgsSnappingConfig::IndividualLayerSettings &other ) const;
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
bool operator== ( const QgsSnappingConfig::IndividualLayerSettings &other ) const;
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-05-02 07:21:20 +02:00
|
|
|
explicit QgsSnappingConfig( QgsProject *project = 0 );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor with default parameters defined in global settings
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
bool operator==( const QgsSnappingConfig &other ) const;
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void reset();
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
|
|
|
reset to default values
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
bool enabled() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns if snapping is enabled
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setEnabled( bool enabled );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
|
|
|
enables the snapping
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
SnappingMode mode() const;
|
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the mode (all layers, active layer, per layer settings)
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
void setMode( SnappingMode mode );
|
|
|
|
%Docstring
|
|
|
|
define the mode of snapping
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
QgsSnappingConfig::SnappingTypeFlag typeFlag() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the flags type (vertices | segments | area | centroid | middle)
|
|
|
|
|
|
|
|
.. versionadded:: 3.12
|
|
|
|
%End
|
|
|
|
|
|
|
|
QgsSnappingConfig::SnappingType type() const /Deprecated/;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2020-03-02 09:02:35 +01:00
|
|
|
Returns the flags type (vertices | segments | area | centroid | middle)
|
|
|
|
|
|
|
|
.. deprecated:: QGIS 3.12
|
|
|
|
use typeFlag instead.
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2020-03-02 09:02:35 +01:00
|
|
|
void setType( QgsSnappingConfig::SnappingType type );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
|
|
|
define the type of snapping
|
2020-03-02 09:02:35 +01:00
|
|
|
|
|
|
|
.. deprecated:: QGIS 3.12
|
|
|
|
use setTypeFlag instead.
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setTypeFlag( QgsSnappingConfig::SnappingTypeFlag type );
|
|
|
|
%Docstring
|
|
|
|
define the type of snapping
|
|
|
|
|
|
|
|
.. versionadded:: 3.12
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
double tolerance() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the tolerance
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setTolerance( double tolerance );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets the tolerance
|
2020-03-16 10:26:23 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 11:40:21 +02:00
|
|
|
double minimumScale() const;
|
2020-03-16 10:26:23 +01:00
|
|
|
%Docstring
|
2020-04-15 15:45:00 +02:00
|
|
|
Returns the min scale (i.e. most \"zoomed out\" scale)
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-03-16 10:26:23 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 16:12:26 +02:00
|
|
|
void setMinimumScale( double minScale );
|
2020-03-16 10:26:23 +01:00
|
|
|
%Docstring
|
2020-03-18 09:22:49 +01:00
|
|
|
Sets the min scale on which snapping is enabled, 0.0 disable scale limit
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-03-16 10:26:23 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 11:40:21 +02:00
|
|
|
double maximumScale() const;
|
2020-03-16 10:26:23 +01:00
|
|
|
%Docstring
|
2020-04-15 15:45:00 +02:00
|
|
|
Returns the max scale (i.e. most \"zoomed in\" scale)
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-03-16 10:26:23 +01:00
|
|
|
%End
|
|
|
|
|
2020-04-06 16:12:26 +02:00
|
|
|
void setMaximumScale( double maxScale );
|
2020-03-16 10:26:23 +01:00
|
|
|
%Docstring
|
2020-03-18 09:22:49 +01:00
|
|
|
Set the max scale on which snapping is enabled, 0.0 disable scale limit
|
2020-03-30 17:32:24 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-03-16 10:26:23 +01:00
|
|
|
%End
|
|
|
|
|
2020-03-30 17:32:24 +02:00
|
|
|
void setScaleDependencyMode( ScaleDependencyMode mode );
|
2020-03-16 10:26:23 +01:00
|
|
|
%Docstring
|
2020-03-30 17:32:24 +02:00
|
|
|
Set the scale dependency mode
|
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2020-03-16 10:26:23 +01:00
|
|
|
%End
|
|
|
|
|
2020-03-30 17:32:24 +02:00
|
|
|
ScaleDependencyMode scaleDependencyMode() const;
|
2020-03-16 10:26:23 +01:00
|
|
|
%Docstring
|
2020-03-30 17:32:24 +02:00
|
|
|
Returns the scale dependency mode
|
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
QgsTolerance::UnitType units() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns the type of units
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setUnits( QgsTolerance::UnitType units );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets the type of units
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
bool intersectionSnapping() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns if the snapping on intersection is enabled
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
void setIntersectionSnapping( bool enabled );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets if the snapping on intersection is enabled
|
2020-05-05 10:30:26 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool selfSnapping() const;
|
|
|
|
%Docstring
|
|
|
|
Returns if self snapping (snapping to the currently digitised feature) is enabled
|
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
|
|
|
%End
|
|
|
|
|
|
|
|
void setSelfSnapping( bool enabled );
|
|
|
|
%Docstring
|
|
|
|
Sets if self snapping (snapping to the currently digitised feature) is enabled
|
|
|
|
|
|
|
|
.. versionadded:: 3.14
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
SIP_PYDICT individualLayerSettings() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns individual snapping settings for all layers
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
%MethodCode
|
|
|
|
// Create the dictionary.
|
2017-05-01 16:42:33 +02:00
|
|
|
PyObject *d = PyDict_New();
|
2017-05-18 07:50:23 +02:00
|
|
|
if ( !d )
|
2017-06-12 09:00:04 +02:00
|
|
|
return nullptr;
|
2016-08-26 15:36:07 +02:00
|
|
|
// Set the dictionary elements.
|
2017-05-18 07:50:23 +02:00
|
|
|
QHash<QgsVectorLayer *, QgsSnappingConfig::IndividualLayerSettings> container = sipCpp->individualLayerSettings();
|
|
|
|
QHash<QgsVectorLayer *, QgsSnappingConfig::IndividualLayerSettings>::const_iterator i = container.constBegin();
|
2016-08-26 15:36:07 +02:00
|
|
|
while ( i != container.constEnd() )
|
|
|
|
{
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsVectorLayer *vl = i.key();
|
|
|
|
QgsSnappingConfig::IndividualLayerSettings *ils = new QgsSnappingConfig::IndividualLayerSettings( i.value() );
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-06-12 09:00:04 +02:00
|
|
|
PyObject *vlobj = sipConvertFromType( vl, sipType_QgsVectorLayer, nullptr );
|
2017-05-01 16:42:33 +02:00
|
|
|
PyObject *ilsobj = sipConvertFromType( ils, sipType_QgsSnappingConfig_IndividualLayerSettings, Py_None );
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
if ( !vlobj || !ilsobj || PyDict_SetItem( d, vlobj, ilsobj ) < 0 )
|
2016-08-26 15:36:07 +02:00
|
|
|
{
|
2017-05-18 07:50:23 +02:00
|
|
|
Py_DECREF( d );
|
|
|
|
if ( vlobj )
|
|
|
|
{
|
|
|
|
Py_DECREF( vlobj );
|
|
|
|
}
|
|
|
|
if ( ilsobj )
|
|
|
|
{
|
|
|
|
Py_DECREF( ilsobj );
|
|
|
|
}
|
2016-08-26 15:36:07 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
delete ils;
|
|
|
|
}
|
2017-05-18 07:50:23 +02:00
|
|
|
PyErr_SetString( PyExc_StopIteration, "" );
|
2016-08-26 15:36:07 +02:00
|
|
|
}
|
|
|
|
Py_DECREF( vlobj );
|
|
|
|
Py_DECREF( ilsobj );
|
|
|
|
++i;
|
|
|
|
}
|
|
|
|
sipRes = d;
|
|
|
|
%End
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsSnappingConfig::IndividualLayerSettings individualLayerSettings( QgsVectorLayer *vl ) const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns individual layer snappings settings (applied if mode is AdvancedConfiguration)
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setIndividualLayerSettings( QgsVectorLayer *vl, const QgsSnappingConfig::IndividualLayerSettings &individualLayerSettings );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Sets individual layer snappings settings (applied if mode is AdvancedConfiguration)
|
2017-05-18 07:50:23 +02:00
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
bool operator!= ( const QgsSnappingConfig &other ) const;
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void readProject( const QDomDocument &doc );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Reads the configuration from the specified QGIS project document.
|
2017-05-18 07:50:23 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void writeProject( QDomDocument &doc );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Writes the configuration to the specified QGIS project document.
|
2017-05-18 07:50:23 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
bool addLayers( const QList<QgsMapLayer *> &layers );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Adds the specified layers as individual layers to the configuration
|
|
|
|
with standard configuration.
|
|
|
|
When implementing a long-living QgsSnappingConfig (like the one in QgsProject)
|
|
|
|
it is best to directly feed this with information from the layer registry.
|
|
|
|
|
2019-02-26 19:54:09 +10:00
|
|
|
:return: ``True`` if changes have been done.
|
2017-05-18 07:50:23 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
bool removeLayers( const QList<QgsMapLayer *> &layers );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Removes the specified layers from the individual layer configuration.
|
|
|
|
When implementing a long-living QgsSnappingConfig (like the one in QgsProject)
|
|
|
|
it is best to directly feed this with information from the layer registry.
|
|
|
|
|
2019-02-26 19:54:09 +10:00
|
|
|
:return: ``True`` if changes have been done.
|
2017-05-18 07:50:23 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsProject *project() const;
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
The project from which the snapped layers should be retrieved
|
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setProject( QgsProject *project );
|
2017-05-18 07:50:23 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
The project from which the snapped layers should be retrieved
|
2017-05-18 07:50:23 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
2016-08-26 15:36:07 +02:00
|
|
|
|
|
|
|
};
|
2020-03-02 09:02:35 +01:00
|
|
|
QFlags<QgsSnappingConfig::SnappingTypes> operator|(QgsSnappingConfig::SnappingTypes f1, QFlags<QgsSnappingConfig::SnappingTypes> f2);
|
|
|
|
|
2017-05-18 07:50:23 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgssnappingconfig.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|