Skip to content
Permalink
Browse files

better layout in dock

  • Loading branch information
3nids authored and m-kuhn committed Oct 1, 2018
1 parent ff9da2f commit 6c069c1910538a34cc101c4611e4ddc9f200d25e
Showing with 113 additions and 24 deletions.
  1. +5 −5 src/app/qgsgeometryvalidationdock.cpp
  2. +108 −19 src/ui/qgsgeometryvalidationdockbase.ui
@@ -41,10 +41,10 @@ QgsGeometryValidationDock::QgsGeometryValidationDock( const QString &title, QgsM
mProblemDescriptionLabel->setFont( font );
mErrorListView->setAlternatingRowColors( true );

connect( mNextButton, &QPushButton::clicked, this, &QgsGeometryValidationDock::gotoNextError );
connect( mPreviousButton, &QPushButton::clicked, this, &QgsGeometryValidationDock::gotoPreviousError );
connect( mZoomToProblemButton, &QPushButton::clicked, this, &QgsGeometryValidationDock::zoomToProblem );
connect( mZoomToFeatureButton, &QPushButton::clicked, this, &QgsGeometryValidationDock::zoomToFeature );
connect( mNextButton, &QToolButton::clicked, this, &QgsGeometryValidationDock::gotoNextError );
connect( mPreviousButton, &QToolButton::clicked, this, &QgsGeometryValidationDock::gotoPreviousError );
connect( mZoomToProblemButton, &QToolButton::clicked, this, &QgsGeometryValidationDock::zoomToProblem );
connect( mZoomToFeatureButton, &QToolButton::clicked, this, &QgsGeometryValidationDock::zoomToFeature );
connect( mMapCanvas, &QgsMapCanvas::currentLayerChanged, this, &QgsGeometryValidationDock::onCurrentLayerChanged );
connect( mMapCanvas, &QgsMapCanvas::currentLayerChanged, this, &QgsGeometryValidationDock::updateLayerTransform );
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged, this, &QgsGeometryValidationDock::updateLayerTransform );
@@ -178,7 +178,7 @@ void QgsGeometryValidationDock::onCurrentErrorChanged( const QModelIndex &curren
QLabel *resolveLabel = new QLabel( resolutionMethod, mResolutionWidget );
resolveLabel->setWordWrap( true );
layout->addWidget( resolveLabel, resolutionIndex, 1 );
connect( resolveBtn, &QPushButton::clicked, this, [resolutionIndex, error, this]()
connect( resolveBtn, &QToolButton::clicked, this, [resolutionIndex, error, this]()
{
mGeometryValidationService->fixError( error, resolutionIndex );
} );
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>607</width>
<height>973</height>
<width>418</width>
<height>404</height>
</rect>
</property>
<property name="windowTitle">
@@ -18,18 +18,29 @@
<item row="3" column="0" colspan="2">
<widget class="QWidget" name="mProblemDetailWidget" native="true">
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="2">
<widget class="QPushButton" name="mZoomToProblemButton">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="6">
<widget class="QToolButton" name="mNextButton">
<property name="text">
<string>Zoom To Problem</string>
<string>Next</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionZoomToLayer.svg</normaloff>:/images/themes/default/mActionZoomToLayer.svg</iconset>
<property name="arrowType">
<enum>Qt::RightArrow</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="1">
<widget class="QToolButton" name="mPreviousButton">
<property name="text">
<string>Previous</string>
@@ -39,29 +50,94 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="mZoomToFeatureButton">
<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="3">
<widget class="QToolButton" name="mNextButton">
<item row="1" column="4">
<widget class="QToolButton" name="mZoomToProblemButton">
<property name="text">
<string>Next</string>
<string>Zoom To Problem</string>
</property>
<property name="arrowType">
<enum>Qt::RightArrow</enum>
<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" colspan="2">
<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">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Detailed Desctiption</string>
</property>
@@ -70,8 +146,21 @@
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QWidget" name="mResolutionWidget" native="true"/>
<item row="3" column="2" colspan="4">
<widget class="QWidget" name="mResolutionWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>

0 comments on commit 6c069c1

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