Skip to content
Permalink
Browse files

Add blend modes widget to vector layer properties dialog

  • Loading branch information
nyalldawson committed Mar 22, 2013
1 parent d80ae2c commit 7e5abdf9f38a0d4f5f847887a45ab1663629373e
Showing with 59 additions and 2 deletions.
  1. +6 −0 src/app/qgsvectorlayerproperties.cpp
  2. +53 −2 src/ui/qgsvectorlayerpropertiesbase.ui
@@ -192,6 +192,9 @@ QgsVectorLayerProperties::QgsVectorLayerProperties(
mLayerAbstractTextEdit->setPlainText( layer->abstract() );
}

// Blend mode
mBlendModeComboBox->setBlendMode( layer->blendMode() );

QSettings settings;
restoreGeometry( settings.value( "/Windows/VectorLayerProperties/geometry" ).toByteArray() );
int tabIndex = settings.value( "/Windows/VectorLayerProperties/row", 0 ).toInt();
@@ -528,6 +531,9 @@ void QgsVectorLayerProperties::apply()
layer->setTitle( mLayerTitleLineEdit->text() );
layer->setAbstract( mLayerAbstractTextEdit->toPlainText() );

// set the blend mode for the layer
layer->setBlendMode(( QgsMapLayer::BlendMode ) mBlendModeComboBox->blendMode() );

// update symbology
emit refreshLegend( layer->id(), QgsLegendItem::DontChange );

@@ -530,7 +530,7 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QGroupBox" name="grpSubset">
<property name="title">
<string>Subset</string>
@@ -578,7 +578,7 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QGroupBox" name="grpProviderOptions">
<property name="title">
<string>Provider-specific options</string>
@@ -600,6 +600,52 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="leftMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="mBlendTypeLabel">
<property name="text">
<string>Composition blending mode</string>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QgsBlendModeComboBox" name="mBlendModeComboBox" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
@@ -1008,6 +1054,11 @@ p, li { white-space: pre-wrap; }
<extends>QWidget</extends>
<header>qgsscalecombobox.h</header>
</customwidget>
<customwidget>
<class>QgsBlendModeComboBox</class>
<extends>QWidget</extends>
<header>qgsblendmodecombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>cbMinimumScale</tabstop>

0 comments on commit 7e5abdf

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