mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Fix style.
This commit is contained in:
parent
c291a17d42
commit
6b9fb087c2
@ -73,7 +73,7 @@ This is a container of advanced configuration (per layer) of the snapping of the
|
|||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) /Deprecated/;
|
IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) /Deprecated/;
|
||||||
%Docstring
|
%Docstring
|
||||||
IndividualLayerSettings
|
IndividualLayerSettings
|
||||||
|
|
||||||
@ -81,6 +81,8 @@ IndividualLayerSettings
|
|||||||
:param type:
|
:param type:
|
||||||
:param tolerance:
|
:param tolerance:
|
||||||
:param units:
|
:param units:
|
||||||
|
:param minScale:
|
||||||
|
:param maxScale:
|
||||||
|
|
||||||
.. deprecated:: QGIS 3.12
|
.. deprecated:: QGIS 3.12
|
||||||
use the method with SnappingTypeFlag instead.
|
use the method with SnappingTypeFlag instead.
|
||||||
@ -96,6 +98,7 @@ IndividualLayerSettings
|
|||||||
:param units:
|
:param units:
|
||||||
:param minScale:
|
:param minScale:
|
||||||
:param maxScale:
|
:param maxScale:
|
||||||
|
|
||||||
.. versionadded:: 3.12
|
.. versionadded:: 3.12
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ void QgsSnappingLayerDelegate::setEditorData( QWidget *editor, const QModelIndex
|
|||||||
w->setCurrentIndex( w->findData( units ) );
|
w->setCurrentIndex( w->findData( units ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn)
|
else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn )
|
||||||
{
|
{
|
||||||
QgsScaleWidget *w = qobject_cast<QgsScaleWidget *>( editor );
|
QgsScaleWidget *w = qobject_cast<QgsScaleWidget *>( editor );
|
||||||
if ( w )
|
if ( w )
|
||||||
@ -214,7 +214,7 @@ void QgsSnappingLayerDelegate::setModelData( QWidget *editor, QAbstractItemModel
|
|||||||
model->setData( index, w->value(), Qt::EditRole );
|
model->setData( index, w->value(), Qt::EditRole );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn)
|
else if ( index.column() == QgsSnappingLayerTreeModel::MinScaleColumn )
|
||||||
{
|
{
|
||||||
QgsScaleWidget *w = qobject_cast<QgsScaleWidget *>( editor );
|
QgsScaleWidget *w = qobject_cast<QgsScaleWidget *>( editor );
|
||||||
if ( w )
|
if ( w )
|
||||||
|
@ -131,7 +131,7 @@ class APP_EXPORT QgsSnappingWidget : public QWidget
|
|||||||
DisplayMode mDisplayMode;
|
DisplayMode mDisplayMode;
|
||||||
|
|
||||||
//! modeChanged determines if widget are visible or not based on mode
|
//! modeChanged determines if widget are visible or not based on mode
|
||||||
void modeChanged();
|
void modeChanged( );
|
||||||
|
|
||||||
QgsProject *mProject = nullptr;
|
QgsProject *mProject = nullptr;
|
||||||
QgsSnappingConfig mConfig;
|
QgsSnappingConfig mConfig;
|
||||||
|
@ -769,7 +769,7 @@ QgsPointLocator::Match QgsVertexTool::snapToEditableLayer( QgsMapMouseEvent *e )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings(
|
config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings(
|
||||||
vlayer == currentVlayer, static_cast<QgsSnappingConfig::SnappingTypeFlag>( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) );
|
vlayer == currentVlayer, static_cast<QgsSnappingConfig::SnappingTypeFlag>( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
snapUtils->setConfig( config );
|
snapUtils->setConfig( config );
|
||||||
@ -796,7 +796,7 @@ QgsPointLocator::Match QgsVertexTool::snapToEditableLayer( QgsMapMouseEvent *e )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings(
|
config.setIndividualLayerSettings( vlayer, QgsSnappingConfig::IndividualLayerSettings(
|
||||||
vlayer->isEditable(), static_cast<QgsSnappingConfig::SnappingTypeFlag>( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) );
|
vlayer->isEditable(), static_cast<QgsSnappingConfig::SnappingTypeFlag>( QgsSnappingConfig::VertexFlag | QgsSnappingConfig::SegmentFlag ), tol, QgsTolerance::ProjectUnits, 0.0, 0.0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
snapUtils->setConfig( config );
|
snapUtils->setConfig( config );
|
||||||
|
@ -120,7 +120,7 @@ class CORE_EXPORT QgsSnappingConfig
|
|||||||
* \param maxScale
|
* \param maxScale
|
||||||
* \deprecated since QGIS 3.12 use the method with SnappingTypeFlag instead.
|
* \deprecated since QGIS 3.12 use the method with SnappingTypeFlag instead.
|
||||||
*/
|
*/
|
||||||
Q_DECL_DEPRECATED IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) SIP_DEPRECATED;
|
Q_DECL_DEPRECATED IndividualLayerSettings( bool enabled, SnappingType type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale ) SIP_DEPRECATED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief IndividualLayerSettings
|
* \brief IndividualLayerSettings
|
||||||
@ -132,7 +132,7 @@ class CORE_EXPORT QgsSnappingConfig
|
|||||||
* \param maxScale
|
* \param maxScale
|
||||||
* \since QGIS 3.12
|
* \since QGIS 3.12
|
||||||
*/
|
*/
|
||||||
IndividualLayerSettings( bool enabled, SnappingTypeFlag type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale );
|
IndividualLayerSettings( bool enabled, SnappingTypeFlag type, double tolerance, QgsTolerance::UnitType units, double minScale, double maxScale );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an invalid setting
|
* Constructs an invalid setting
|
||||||
|
@ -33,7 +33,7 @@ struct FilterExcludePoint : public QgsPointLocator::MatchFilter
|
|||||||
{
|
{
|
||||||
explicit FilterExcludePoint( const QgsPointXY &p ) : mPoint( p ) {}
|
explicit FilterExcludePoint( const QgsPointXY &p ) : mPoint( p ) {}
|
||||||
|
|
||||||
bool acceptMatch( const QgsPointLocator::Match &match ) override { return match.point() != mPoint; }
|
bool acceptMatch( const QgsPointLocator::Match &match ) override { return match.point() != mPoint; }
|
||||||
|
|
||||||
QgsPointXY mPoint;
|
QgsPointXY mPoint;
|
||||||
};
|
};
|
||||||
@ -349,7 +349,7 @@ class TestQgsSnappingUtils : public QObject
|
|||||||
QgsSnappingConfig snappingConfig = u.config();
|
QgsSnappingConfig snappingConfig = u.config();
|
||||||
snappingConfig.setEnabled( true );
|
snappingConfig.setEnabled( true );
|
||||||
snappingConfig.setMode( QgsSnappingConfig::AdvancedConfiguration );
|
snappingConfig.setMode( QgsSnappingConfig::AdvancedConfiguration );
|
||||||
QgsSnappingConfig::IndividualLayerSettings layerSettings( true, QgsSnappingConfig::VertexFlag, 0.2, QgsTolerance::ProjectUnits, 0.0, 0.0 );
|
QgsSnappingConfig::IndividualLayerSettings layerSettings( true, QgsSnappingConfig::VertexFlag, 0.2, QgsTolerance::ProjectUnits, 0.0, 0.0 );
|
||||||
snappingConfig.setIntersectionSnapping( true );
|
snappingConfig.setIntersectionSnapping( true );
|
||||||
snappingConfig.setIndividualLayerSettings( vCurveZ.get(), layerSettings );
|
snappingConfig.setIndividualLayerSettings( vCurveZ.get(), layerSettings );
|
||||||
u.setConfig( snappingConfig );
|
u.setConfig( snappingConfig );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user