Skip to content
Permalink
Browse files

Merge pull request #9546 from m-kuhn/geometry-validation-dock-layout

Improve Geometry Validation Dock Layout
  • Loading branch information
m-kuhn committed Mar 18, 2019
2 parents 0c265d7 + 2a02aa0 commit 128477d7972d39cb6eda124dae9a3163d312bf6d
Showing with 80 additions and 134 deletions.
  1. +0 −9 src/app/qgsgeometryvalidationdock.cpp
  2. +0 −1 src/app/qgsgeometryvalidationdock.h
  3. +80 −124 src/ui/qgsgeometryvalidationdockbase.ui
@@ -50,7 +50,6 @@ QgsGeometryValidationDock::QgsGeometryValidationDock( const QString &title, QgsM
connect( mMapCanvas, &QgsMapCanvas::currentLayerChanged, this, &QgsGeometryValidationDock::updateLayerTransform );
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsGeometryValidationDock::updateLayerTransform );
connect( mMapCanvas, &QgsMapCanvas::transformContextChanged, this, &QgsGeometryValidationDock::updateLayerTransform );
connect( mTopologyChecksPendingButton, &QToolButton::clicked, this, &QgsGeometryValidationDock::triggerTopologyChecks );

mFeatureRubberband = new QgsRubberBand( mMapCanvas );
mErrorRubberband = new QgsRubberBand( mMapCanvas );
@@ -133,13 +132,6 @@ void QgsGeometryValidationDock::zoomToFeature()
}
}

void QgsGeometryValidationDock::triggerTopologyChecks()
{
QgsVectorLayer *layer = qobject_cast<QgsVectorLayer *>( mMapCanvas->currentLayer() );
if ( layer )
mGeometryValidationService->triggerTopologyChecks( layer );
}

void QgsGeometryValidationDock::updateLayerTransform()
{
if ( !mMapCanvas->currentLayer() )
@@ -307,7 +299,6 @@ void QgsGeometryValidationDock::onLayerEditingStatusChanged()
}
}
}
mTopologyChecksPendingButton->setEnabled( enabled );
}

void QgsGeometryValidationDock::onLayerDestroyed( QObject *layer )
@@ -53,7 +53,6 @@ class QgsGeometryValidationDock : public QgsDockWidget, public Ui_QgsGeometryVal
void gotoPreviousError();
void zoomToProblem();
void zoomToFeature();
void triggerTopologyChecks();
void updateLayerTransform();
void onDataChanged( const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles );
void onRowsInserted();
@@ -6,16 +6,93 @@
<rect>
<x>0</x>
<y>0</y>
<width>418</width>
<height>404</height>
<width>616</width>
<height>968</height>
</rect>
</property>
<property name="windowTitle">
<string>Geometry Validation</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QGridLayout" name="gridLayout_2">
<item row="3" column="0" colspan="2">
<item row="0" column="5">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="3">
<widget class="QToolButton" name="mZoomToFeatureButton">
<property name="text">
<string>Zoom To Feature</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToSelected.svg</normaloff>:/images/themes/default/mActionZoomToSelected.svg</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item row="0" column="6">
<widget class="QToolButton" name="mNextButton">
<property name="text">
<string>Next</string>
</property>
<property name="arrowType">
<enum>Qt::RightArrow</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="4">
<widget class="QToolButton" name="mZoomToProblemButton">
<property name="text">
<string>Zoom To Problem</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToLayer.svg</normaloff>:/images/themes/default/mActionZoomToLayer.svg</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="mPreviousButton">
<property name="text">
<string>Previous</string>
</property>
<property name="arrowType">
<enum>Qt::LeftArrow</enum>
</property>
</widget>
</item>
<item row="1" column="0" colspan="8">
<widget class="QListView" name="mErrorListView"/>
</item>
<item row="2" column="0" colspan="8">
<widget class="QWidget" name="mProblemDetailWidget" native="true">
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
@@ -30,106 +107,6 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="6">
<widget class="QToolButton" name="mNextButton">
<property name="text">
<string>Next</string>
</property>
<property name="arrowType">
<enum>Qt::RightArrow</enum>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QToolButton" name="mPreviousButton">
<property name="text">
<string>Previous</string>
</property>
<property name="arrowType">
<enum>Qt::LeftArrow</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QToolButton" name="mZoomToFeatureButton">
<property name="text">
<string>Zoom To Feature</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToSelected.svg</normaloff>:/images/themes/default/mActionZoomToSelected.svg</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QToolButton" name="mZoomToProblemButton">
<property name="text">
<string>Zoom To Problem</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToLayer.svg</normaloff>:/images/themes/default/mActionZoomToLayer.svg</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item row="1" column="7">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="5">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2" colspan="4">
<widget class="QLabel" name="mProblemDescriptionLabel">
<property name="sizePolicy">
@@ -165,27 +142,6 @@
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QListView" name="mErrorListView"/>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="mTopologyChecksPendingButton">
<property name="text">
<string>…</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mIconTopologicalEditing.svg</normaloff>:/images/themes/default/mIconTopologicalEditing.svg</iconset>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="mValidationRunningLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</widget>

0 comments on commit 128477d

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