Skip to content
Permalink
Browse files

Bring cap style combo box back (got lost somehow while merging the br…

…anch)
  • Loading branch information
mhugent committed Apr 1, 2013
1 parent 16b1e93 commit d232360ff71b76cfe29c3c0e3e7ace108fd70cce
Showing with 104 additions and 89 deletions.
  1. +5 −0 src/gui/symbology-ng/qgssymbollayerv2widget.cpp
  2. +99 −89 src/ui/symbollayer/widget_simpleline.ui
@@ -56,6 +56,7 @@ QgsSimpleLineSymbolLayerV2Widget::QgsSimpleLineSymbolLayerV2Widget( const QgsVec
connect( btnChangeColor, SIGNAL( colorChanged( const QColor& ) ), this, SLOT( colorChanged( const QColor& ) ) );
connect( cboPenStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( penStyleChanged() ) );
connect( spinOffset, SIGNAL( valueChanged( double ) ), this, SLOT( offsetChanged() ) );
connect( cboCapStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( penStyleChanged() ) );
connect( cboJoinStyle, SIGNAL( currentIndexChanged( int ) ), this, SLOT( penStyleChanged() ) );
updatePatternIcon();

@@ -87,10 +88,13 @@ void QgsSimpleLineSymbolLayerV2Widget::setSymbolLayer( QgsSymbolLayerV2* layer )
spinOffset->setValue( mLayer->offset() );
cboPenStyle->blockSignals( true );
cboJoinStyle->blockSignals( true );
cboCapStyle->blockSignals( true );
cboPenStyle->setPenStyle( mLayer->penStyle() );
cboJoinStyle->setPenJoinStyle( mLayer->penJoinStyle() );
cboCapStyle->setPenCapStyle( mLayer->penCapStyle() );
cboPenStyle->blockSignals( false );
cboJoinStyle->blockSignals( false );
cboCapStyle->blockSignals( false );

//use a custom dash pattern?
bool useCustomDashPattern = mLayer->useCustomDashPattern();
@@ -126,6 +130,7 @@ void QgsSimpleLineSymbolLayerV2Widget::penStyleChanged()
{
mLayer->setPenStyle( cboPenStyle->penStyle() );
mLayer->setPenJoinStyle( cboJoinStyle->penJoinStyle() );
mLayer->setPenCapStyle( cboCapStyle->penCapStyle() );
emit changed();
}

@@ -14,64 +14,72 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1" colspan="2">
<widget class="QgsColorButton" name="btnChangeColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Change...</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Color</string>
<string>Join style</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Pen width</string>
<item row="7" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
</widget>
<item>
<widget class="QCheckBox" name="mCustomCheckBox">
<property name="text">
<string>Use custom dash pattern</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mChangePatternButton">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Join style</string>
<string>Pen style</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinWidth">
<item row="0" column="1" colspan="2">
<widget class="QgsColorButton" name="btnChangeColor">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Change...</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="spinOffset">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="decimals">
<number>5</number>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QComboBox" name="mPenWidthUnitComboBox">
<item row="2" column="2">
<widget class="QComboBox" name="mOffsetUnitComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -90,65 +98,33 @@
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Offset</string>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinWidth">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="spinOffset">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="decimals">
<number>5</number>
</property>
<property name="minimum">
<double>-100000.000000000000000</double>
</property>
<property name="maximum">
<double>100000.000000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QgsPenJoinStyleComboBox" name="cboJoinStyle"/>
</item>
<item row="6" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
<widget class="QCheckBox" name="mCustomCheckBox">
<property name="text">
<string>Use custom dash pattern</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mChangePatternButton">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="1" colspan="2">
<widget class="QgsPenStyleComboBox" name="cboPenStyle"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Pen style</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="mOffsetUnitComboBox">
<item row="1" column="2">
<widget class="QComboBox" name="mPenWidthUnitComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -167,14 +143,7 @@
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mDashPatternUnitLabel">
<property name="text">
<string>Dash pattern unit</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="2">
<item row="8" column="1" colspan="2">
<widget class="QComboBox" name="mDashPatternUnitComboBox">
<item>
<property name="text">
@@ -188,7 +157,10 @@
</item>
</widget>
</item>
<item row="8" column="0" colspan="3">
<item row="3" column="1" colspan="2">
<widget class="QgsPenStyleComboBox" name="cboPenStyle"/>
</item>
<item row="9" column="0" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mDataDefinedPropertiesLabel">
@@ -212,14 +184,47 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Pen width</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Offset</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="mDashPatternUnitLabel">
<property name="text">
<string>Dash pattern unit</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QgsPenCapStyleComboBox" name="cboCapStyle"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Cap style</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
<customwidget>
<class>QgsPenStyleComboBox</class>
<extends>QComboBox</extends>
@@ -235,6 +240,11 @@
<extends>QComboBox</extends>
<header>qgspenstylecombobox.h</header>
</customwidget>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>

0 comments on commit d232360

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