From cc4bef9061925ec25c137078d700156cfe2596f2 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Tue, 1 Nov 2011 23:55:14 -0300 Subject: [PATCH] More intuitive setting for orientation of labels (map/line) --- src/app/qgslabelinggui.cpp | 8 +-- src/ui/qgslabelingguibase.ui | 132 +++++++++++++++-------------------- 2 files changed, 58 insertions(+), 82 deletions(-) diff --git a/src/app/qgslabelinggui.cpp b/src/app/qgslabelinggui.cpp index c80473a9f90..b511d1a5537 100644 --- a/src/app/qgslabelinggui.cpp +++ b/src/app/qgslabelinggui.cpp @@ -126,10 +126,8 @@ QgsLabelingGui::QgsLabelingGui( QgsPalLabeling* lbl, QgsVectorLayer* layer, QgsM chkLineAbove->setChecked( lyr.placementFlags & QgsPalLayerSettings::AboveLine ); chkLineBelow->setChecked( lyr.placementFlags & QgsPalLayerSettings::BelowLine ); chkLineOn->setChecked( lyr.placementFlags & QgsPalLayerSettings::OnLine ); - if ( lyr.placementFlags & QgsPalLayerSettings::MapOrientation ) - radOrientationMap->setChecked( true ); - else - radOrientationLine->setChecked( true ); + if ( ! ( lyr.placementFlags & QgsPalLayerSettings::MapOrientation ) ) + chkLineOrientationDependent->setChecked( true ); } cboFieldName->setCurrentIndex( cboFieldName->findText( lyr.fieldName ) ); @@ -260,7 +258,7 @@ QgsPalLayerSettings QgsLabelingGui::layerSettings() if ( chkLineOn->isChecked() ) lyr.placementFlags |= QgsPalLayerSettings::OnLine; - if ( radOrientationMap->isChecked() ) + if ( ! chkLineOrientationDependent->isChecked() ) lyr.placementFlags |= QgsPalLayerSettings::MapOrientation; } else if (( stackedPlacement->currentWidget() == pageLine && radLineHorizontal->isChecked() ) diff --git a/src/ui/qgslabelingguibase.ui b/src/ui/qgslabelingguibase.ui index c65dbe913bb..89c645ec76e 100644 --- a/src/ui/qgslabelingguibase.ui +++ b/src/ui/qgslabelingguibase.ui @@ -473,8 +473,8 @@ 0 0 - 646 - 451 + 658 + 443 @@ -731,7 +731,7 @@ - 0 + 1 @@ -821,82 +821,60 @@ - - - - - - - - - Orientation - - - - - - - map - - - true - - - - - - - line - - - - - - - - - - - - Label distance - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 4 - - - 999999999.000000000000000 - - - - - - + + + + 0 + + + + + + + Label distance + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 4 + + + 999999999.000000000000000 + + + + + + + + In mm + + + + + In map units + + + + + + + + - In mm + Line orientation dependent position - - - - In map units - - - - - + + + + - - - - - @@ -933,8 +911,8 @@ 0 0 - 646 - 585 + 249 + 567