Skip to content
Permalink
Browse files
Move blend mode combo box to styles tab
  • Loading branch information
nyalldawson committed Mar 23, 2013
1 parent a006d99 commit 3bb405f7f2cd5bde02cf5685080cb4d33400072f
@@ -192,9 +192,6 @@ 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();
@@ -531,9 +528,6 @@ 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 );

@@ -87,6 +87,9 @@ QgsRendererV2PropertiesDialog::QgsRendererV2PropertiesDialog( QgsVectorLayer* la
// initialize registry's widget functions
_initRendererWidgetFunctions();

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

QPixmap pix;
QgsRendererV2Registry* reg = QgsRendererV2Registry::instance();
QStringList renderers = reg->renderersList();
@@ -177,6 +180,9 @@ void QgsRendererV2PropertiesDialog::apply()
{
mLayer->setRendererV2( renderer->clone() );
}

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

void QgsRendererV2PropertiesDialog::onOK()
@@ -145,6 +145,19 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="mBlendTypeLabel">
<property name="text">
<string>Blending mode</string>
</property>
</widget>
</item>
<item>
<widget class="QgsBlendModeComboBox" name="mBlendModeComboBox" native="true">
<property name="minimumSize">
</property>
</widget>
</item>
</layout>
</item>
<item>
@@ -158,13 +171,19 @@
</widget>
</item>
<item>
<widget class="QgsCollapsibleGroupBox" name="mResamplingGroupBox"><property name="collapsed" stdset="0"><bool>false</bool></property><property name="saveCollapsedState" stdset="0"><bool>true</bool></property>
<widget class="QgsCollapsibleGroupBox" name="mResamplingGroupBox">
<property name="title">
<string>Resampling</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="collapsed" stdset="0">
<bool>false</bool>
</property>
<property name="saveCollapsedState" stdset="0">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="mZoomedInResamplingLabel">
@@ -869,52 +888,6 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="leftMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</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_6">
<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>
<item>
<widget class="QGroupBox" name="grpSRS">
<property name="title">
@@ -32,6 +32,16 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Blending mode</string>
</property>
</widget>
</item>
<item>
<widget class="QgsBlendModeComboBox" name="mBlendModeComboBox" native="true"/>
</item>
<item>
<widget class="QPushButton" name="btnOldSymbology">
<property name="text">
@@ -77,6 +87,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsBlendModeComboBox</class>
<extends>QWidget</extends>
<header>qgsblendmodecombobox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>cboRenderers</tabstop>
<tabstop>buttonBox</tabstop>
@@ -530,7 +530,7 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</item>
<item row="4" column="0">
<item row="3" 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="3" column="0">
<item row="2" column="0">
<widget class="QGroupBox" name="grpProviderOptions">
<property name="title">
<string>Provider-specific options</string>
@@ -600,52 +600,6 @@ 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>
@@ -1054,11 +1008,6 @@ 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 3bb405f

Please sign in to comment.