Skip to content
Permalink
Browse files

UI improvements

  • Loading branch information
m-kuhn committed Oct 15, 2018
1 parent 1b0bd51 commit cde294ebb83eeea0102fe37dab95095717caff38
@@ -16,3 +16,8 @@
#include "qgsgeometrycheckfactory.h"

#include "qgis.h"

QgsGeometryCheck::CheckType QgsGeometryCheckFactory::flags() const
{
return QgsGeometryCheck::FeatureNodeCheck;
}
@@ -16,6 +16,8 @@
#ifndef QGSGEOMETRYCHECKFACTORY_H
#define QGSGEOMETRYCHECKFACTORY_H

#define SIP_NO_FILE

#include <QString>
#include <QMap>
#include <QVariantMap>
@@ -16,6 +16,8 @@
#ifndef QGSGEOMETRYCHECKREGISTRY_H
#define QGSGEOMETRYCHECKREGISTRY_H

#define SIP_NO_FILE

#include <QString>
#include <QMap>
#include <QVariant>
@@ -634,6 +634,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/app/dwg
${CMAKE_SOURCE_DIR}/src/app/mesh
${CMAKE_SOURCE_DIR}/src/app/locator
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/annotations
@@ -81,6 +81,9 @@
#include "qgsvectorlayerjoinbuffer.h"
#include "qgsgeometryvalidationservice.h"

#include "qgsanalysis.h"
#include "qgsgeometrycheckregistry.h"

#ifdef HAVE_3D
#include "qgsabstract3drenderer.h"
#include "qgs3danimationsettings.h"
@@ -922,6 +925,8 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
functionProfile( &QgisApp::initLayouts, this, QStringLiteral( "Initialize layouts support" ) );

startProfile( QStringLiteral( "Geometry validation" ) );
QgsAnalysis::instance()->geometryCheckRegistry()->initialize();

mGeometryValidationService = qgis::make_unique<QgsGeometryValidationService>( QgsProject::instance() );
mGeometryValidationDock = new QgsGeometryValidationDock( tr( "Geometry Validation" ) );
mGeometryValidationModel = new QgsGeometryValidationModel( mGeometryValidationService.get(), mGeometryValidationDock );
@@ -400,17 +400,17 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
if ( mLayer->isSpatial() )
{
mRemoveDuplicateNodesCheckbox->setEnabled( true );
mGeometryPrecisionSpinBox->setEnabled( true );
mGeometryPrecisionLineEdit->setEnabled( true );

mRemoveDuplicateNodesCheckbox->setChecked( mLayer->geometryOptions()->removeDuplicateNodes() );
mGeometryPrecisionSpinBox->setValue( mLayer->geometryOptions()->geometryPrecision() );
mGeometryPrecisionLineEdit->setText( QString::number( mLayer->geometryOptions()->geometryPrecision() ) );

mGeometryPrecisionSpinBox->setSuffix( QStringLiteral( " [%1]" ).arg( QgsUnitTypes::toAbbreviatedString( mLayer->crs().mapUnits() ) ) );
mPrecisionUnitsLabel->setText( QStringLiteral( "[%1]" ).arg( QgsUnitTypes::toAbbreviatedString( mLayer->crs().mapUnits() ) ) );
}
else
{
mRemoveDuplicateNodesCheckbox->setEnabled( false );
mGeometryPrecisionSpinBox->setEnabled( false );
mGeometryPrecisionLineEdit->setEnabled( false );
mGeometryAutoFixesGroupBox->setEnabled( false );
}

@@ -753,7 +753,7 @@ void QgsVectorLayerProperties::apply()
#endif

mLayer->geometryOptions()->setRemoveDuplicateNodes( mRemoveDuplicateNodesCheckbox->isChecked() );
mLayer->geometryOptions()->setGeometryPrecision( mGeometryPrecisionSpinBox->value() );
mLayer->geometryOptions()->setGeometryPrecision( mGeometryPrecisionLineEdit->text().toDouble() );

mLayer->triggerRepaint();
// notify the project we've made a change
@@ -721,8 +721,8 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>653</width>
<height>806</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
@@ -907,8 +907,8 @@ border-radius: 2px;</string>
<rect>
<x>0</x>
<y>0</y>
<width>104</width>
<height>102</height>
<width>653</width>
<height>806</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
@@ -2410,6 +2410,28 @@ border-radius: 2px;</string>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="mGeometryValidationGroupBox">
<property name="title">
<string>Geometry validation</string>
</property>
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>352</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>

0 comments on commit cde294e

Please sign in to comment.
You can’t perform that action at this time.