Skip to content

Commit

Permalink
better layout in dock
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and m-kuhn committed Oct 15, 2018
1 parent ff9da2f commit 6c069c1
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 24 deletions.
10 changes: 5 additions & 5 deletions src/app/qgsgeometryvalidationdock.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
} );
Expand Down
127 changes: 108 additions & 19 deletions src/ui/qgsgeometryvalidationdockbase.ui
Expand Up @@ -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">
Expand All @@ -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>
Expand All @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 6c069c1

Please sign in to comment.