Skip to content
Permalink
Browse files

[labeling] use QgsColorButtonV2 for label property dialog

  • Loading branch information
slarosa committed Dec 2, 2014
1 parent 2eb0ca3 commit d034a6677cfadacb753dd946da81a37d52c071e3
Showing with 78 additions and 53 deletions.
  1. +2 −1 src/app/qgslabelpropertydialog.cpp
  2. +76 −52 src/ui/qgslabelpropertydialogbase.ui
@@ -104,7 +104,8 @@ void QgsLabelPropertyDialog::init( const QString& layerId, int featureId, const
updateFont( mLabelFont, false );

//set all the gui elements to the default layer-level values
mBufferColorButton->setColor( layerSettings.textColor );
mFontColorButton->setColor( layerSettings.textColor );
mBufferColorButton->setColor( layerSettings.bufferColor );
mLabelDistanceSpinBox->setValue( layerSettings.dist );
mBufferSizeSpinBox->setValue( layerSettings.bufferSize );
mMinScaleSpinBox->setValue( layerSettings.scaleMin );
@@ -34,60 +34,13 @@
<string>Font</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1" colspan="2">
<widget class="QComboBox" name="mFontStyleCmbBx">
<property name="toolTip">
<string>Available typeface styles</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QgsColorButton" name="mFontColorButton">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QFontComboBox" name="mFontFamilyCmbBx">
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="mFontSizeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Size</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mFontSizeSpinBox">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="maximum">
<double>999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="sizePolicy">
@@ -101,6 +54,13 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="mFontStyleCmbBx">
<property name="toolTip">
<string>Available typeface styles</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
@@ -255,6 +215,58 @@
</item>
</layout>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="mFontSizeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Size</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="mFontSizeSpinBox">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="maximum">
<double>999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="2">
<widget class="QgsColorButtonV2" name="mFontColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -370,10 +382,22 @@
</layout>
</item>
<item row="0" column="1">
<widget class="QgsColorButton" name="mBufferColorButton">
<widget class="QgsColorButtonV2" name="mBufferColorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<width>120</width>
<height>16777215</height>
</size>
</property>
@@ -543,9 +567,9 @@
</widget>
<customwidgets>
<customwidget>
<class>QgsColorButton</class>
<extends>QPushButton</extends>
<header>qgscolorbutton.h</header>
<class>QgsColorButtonV2</class>
<extends>QToolButton</extends>
<header>qgscolorbuttonv2.h</header>
</customwidget>
</customwidgets>
<resources/>

0 comments on commit d034a66

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