Skip to content
Permalink
Browse files

Updated symbol selector GUI to reflect the design created with Tim

git-svn-id: http://svn.osgeo.org/qgis/trunk@12760 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Jan 14, 2010
1 parent bffa5cc commit 37f6f4147cdcedb803e73216944ddc97e1e8cd94
Showing with 153 additions and 147 deletions.
  1. +4 −23 src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
  2. +149 −124 src/ui/qgssymbolv2selectordialogbase.ui
@@ -41,18 +41,9 @@ QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsSt
updateSymbolPreview();
updateSymbolInfo();

//output unit
// output unit
mSymbolUnitComboBox->blockSignals( true );
mSymbolUnitComboBox->addItem( tr( "Millimeter" ) );
mSymbolUnitComboBox->addItem( tr( "Map unit" ) );
if ( mSymbol && mSymbol->outputUnit() == QgsSymbolV2::MM )
{
mSymbolUnitComboBox->setCurrentIndex( mSymbolUnitComboBox->findText( tr( "Millimeter" ) ) );
}
else
{
mSymbolUnitComboBox->setCurrentIndex( mSymbolUnitComboBox->findText( tr( "Map unit" ) ) );
}
mSymbolUnitComboBox->setCurrentIndex( mSymbol->outputUnit() );
mSymbolUnitComboBox->blockSignals( false );

// select correct page in stacked widget
@@ -241,18 +232,8 @@ void QgsSymbolV2SelectorDialog::keyPressEvent( QKeyEvent * e )

void QgsSymbolV2SelectorDialog::on_mSymbolUnitComboBox_currentIndexChanged( const QString & text )
{
if ( !mSymbol )
{
return;
}
if ( text == tr( "Millimeter" ) )
{
mSymbol->setOutputUnit( QgsSymbolV2::MM );
}
else //map unit
{
mSymbol->setOutputUnit( QgsSymbolV2::MapUnit );
}
mSymbol->setOutputUnit( (QgsSymbolV2::OutputUnit) mSymbolUnitComboBox->currentIndex() );

updateSymbolPreview();
emit symbolModified();
}
@@ -45,122 +45,160 @@
</widget>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>2</number>
</property>
<widget class="QWidget" name="pageMarker">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnColorMarker">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Size</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinSize">
<property name="decimals">
<number>1</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="mSymbolUnitLabel">
<property name="text">
<string>Rotation</string>
<string>Unit</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="spinAngle">
<property name="suffix">
<string>°</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
<property name="singleStep">
<double>5.000000000000000</double>
</property>
<item>
<widget class="QComboBox" name="mSymbolUnitComboBox">
<item>
<property name="text">
<string>Millimeter</string>
</property>
</item>
<item>
<property name="text">
<string>Map unit</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageLine">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnColorLine">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinWidth">
<property name="decimals">
<number>1</number>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="pageMarker">
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="value">
<double>1.000000000000000</double>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnColorMarker">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Size</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinSize">
<property name="decimals">
<number>1</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Rotation</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="spinAngle">
<property name="suffix">
<string>°</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
<property name="singleStep">
<double>5.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageLine">
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageFill">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Color</string>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QgsColorButtonV2" name="btnColorLine">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Width</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="spinWidth">
<property name="decimals">
<number>1</number>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pageFill">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QgsColorButtonV2" name="btnColorFill">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item>
<widget class="QgsColorButtonV2" name="btnColorFill">
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</item>
@@ -196,27 +234,13 @@
</layout>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="mSymbolUnitLabel">
<property name="text">
<string>Symbol Unit:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="mSymbolUnitComboBox"/>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Symbols from style:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="3" column="0">
<widget class="QListView" name="viewSymbols">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@@ -244,7 +268,7 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="4" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -264,13 +288,14 @@
</customwidget>
</customwidgets>
<tabstops>
<tabstop>btnSymbolProperties</tabstop>
<tabstop>mSymbolUnitComboBox</tabstop>
<tabstop>btnColorFill</tabstop>
<tabstop>btnColorMarker</tabstop>
<tabstop>spinSize</tabstop>
<tabstop>spinAngle</tabstop>
<tabstop>btnColorLine</tabstop>
<tabstop>spinWidth</tabstop>
<tabstop>btnColorFill</tabstop>
<tabstop>btnSymbolProperties</tabstop>
<tabstop>btnAddToStyle</tabstop>
<tabstop>viewSymbols</tabstop>
<tabstop>buttonBox</tabstop>

0 comments on commit 37f6f41

Please sign in to comment.