Skip to content
Permalink
Browse files

add missing combobox to set data defined label color

git-svn-id: http://svn.osgeo.org/qgis/trunk@10746 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed May 6, 2009
1 parent 3fa33b5 commit 3f90ce6d461fcb0f2d08fe2039c5a9d2b4b4f489
Showing with 83 additions and 41 deletions.
  1. +9 −2 src/app/qgslabeldialog.cpp
  2. +74 −39 src/ui/qgslabeldialogbase.ui
@@ -72,7 +72,6 @@ void QgsLabelDialog::init( )
cboLabelField->addItems( myFieldStringList );
cboLabelField->setCurrentIndex( itemNoForField( mLabel->labelField( QgsLabel::Text ), myFieldStringList ) );


cboFontField->clear();
cboFontField->addItems( myFieldStringList );
cboFontField->setCurrentIndex( itemNoForField( mLabel->labelField( QgsLabel::Family ), myFieldStringList ) );
@@ -98,9 +97,16 @@ void QgsLabelDialog::init( )
cboFontSizeTypeField->addItems( myFieldStringList );
cboFontSizeTypeField->setCurrentIndex( itemNoForField( mLabel->labelField( QgsLabel::SizeType ), myFieldStringList ) );

#if 0
cboFontTransparencyField->clear();
cboFontTransparencyField->addItems( myFieldStringList );
//cboFontTransparencyField->setCurrentIndex(itemNoForField(mLabel->labelField(QgsLabel::FontTransparency),myFieldStringList));
cboFontTransparencyField->setCurrentIndex( itemNoForField( mLabel->labelField( QgsLabel::FontTransparency ), myFieldStringList ) );
#endif

cboFontColorField->clear();
cboFontColorField->addItems( myFieldStringList );
cboFontColorField->setCurrentIndex( itemNoForField( mLabel->labelField( QgsLabel::Color ), myFieldStringList ) );


cboBufferSizeField->clear();
cboBufferSizeField->addItems( myFieldStringList );
@@ -389,6 +395,7 @@ void QgsLabelDialog::apply()
mLabel->setLabelField( QgsLabel::Underline, fieldIndexFromName( cboUnderlineField->currentText() ) );
mLabel->setLabelField( QgsLabel::Size, fieldIndexFromName( cboFontSizeField->currentText() ) );
mLabel->setLabelField( QgsLabel::SizeType, fieldIndexFromName( cboFontSizeTypeField->currentText() ) );
mLabel->setLabelField( QgsLabel::Color, fieldIndexFromName( cboFontColorField->currentText() ) );
mLabel->setLabelField( QgsLabel::BufferSize, fieldIndexFromName( cboBufferSizeField->currentText() ) );
//mLabel->setLabelField( QgsLabel::BufferTransparency, cboBufferTransparencyField->currentText() );
mLabel->setLabelField( QgsLabel::XCoordinate, fieldIndexFromName( cboXCoordinateField->currentText() ) );
@@ -117,6 +117,31 @@
</item>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox5" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Preview:</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="lblSample" >
<property name="text" >
<string>QGIS Rocks!</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" >
<widget class="QStackedWidget" name="stackedWidget" >
<property name="sizePolicy" >
@@ -126,15 +151,15 @@
</sizepolicy>
</property>
<property name="currentIndex" >
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="page" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>309</width>
<height>394</height>
<width>304</width>
<height>399</height>
</rect>
</property>
<layout class="QGridLayout" >
@@ -421,8 +446,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>309</width>
<height>394</height>
<width>304</width>
<height>399</height>
</rect>
</property>
<layout class="QGridLayout" >
@@ -537,8 +562,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>304</width>
<height>399</height>
</rect>
</property>
<layout class="QGridLayout" >
@@ -613,11 +638,11 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>304</width>
<height>399</height>
</rect>
</property>
<layout class="QGridLayout" >
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="lblFont" >
<property name="sizePolicy" >
@@ -776,6 +801,9 @@
</item>
<item row="6" column="0" >
<widget class="QLabel" name="textLabel4_3_2_3" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
@@ -792,6 +820,35 @@
</item>
<item row="6" column="1" >
<widget class="QComboBox" name="cboFontTransparencyField" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="textLabel4_3_2_5" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>&amp;Color</string>
</property>
<property name="buddy" >
<cstring>cboFontColorField</cstring>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QComboBox" name="cboFontColorField" >
<property name="minimumSize" >
<size>
<width>0</width>
@@ -807,8 +864,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>304</width>
<height>399</height>
</rect>
</property>
<layout class="QGridLayout" >
@@ -851,8 +908,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>304</width>
<height>399</height>
</rect>
</property>
<layout class="QGridLayout" >
@@ -987,32 +1044,10 @@
</widget>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox5" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Preview:</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="lblSample" >
<property name="text" >
<string>QGIS Rocks!</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
<zorder>listWidget</zorder>
<zorder>groupBox5</zorder>
<zorder>stackedWidget</zorder>
</widget>
<layoutdefault spacing="6" margin="11" />
<tabstops>

0 comments on commit 3f90ce6

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