Skip to content
Permalink
Browse files

fixed the symbol editor tweaks"

"
  • Loading branch information
tecoholic committed Jul 11, 2012
1 parent b1c4a83 commit 63eba56b0a92712cf21393a8dade3dd59cb1079a
@@ -53,7 +53,16 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty
viewSymbols->setModel( model );
connect( viewSymbols, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( setSymbolFromStyle( const QModelIndex & ) ) );

connect( btnStyleManager, SIGNAL( clicked() ), SLOT( openStyleManager() ) );
// Set the Style Menu under btnStyle
QMenu *styleMenu = new QMenu( btnStyle );
QAction *styleMgrAction = new QAction( "Style Manager", styleMenu );
styleMenu->addAction( styleMgrAction );
QAction *saveStyle = new QAction( "Save as style", styleMenu );
styleMenu->addAction( saveStyle );
connect( styleMgrAction, SIGNAL( triggered() ), this, SLOT( openStyleManager() ) );
connect( saveStyle, SIGNAL( triggered() ), this, SLOT( addSymbolToStyle() ) );
btnStyle->setMenu( styleMenu );

lblSymbolName->setText( "" );
populateSymbolView();

@@ -79,8 +88,6 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty
connect( spinSize, SIGNAL( valueChanged( double ) ), this, SLOT( setMarkerSize( double ) ) );
connect( spinWidth, SIGNAL( valueChanged( double ) ), this, SLOT( setLineWidth( double ) ) );

connect( btnAddToStyle, SIGNAL( clicked() ), this, SLOT( addSymbolToStyle() ) );
btnAddToStyle->setIcon( QIcon( QgsApplication::defaultThemePath() + "symbologyAdd.png" ) );

// Set symbol color in btnColor
updateSymbolColor();
@@ -495,13 +495,8 @@ void QgsSymbolV2SelectorDialog::changeLayer( QgsSymbolLayerV2* newLayer )
// When it is a marker symbol
if ( newLayer->subSymbol() )
{
/*
SymbolLayerItem *subsymbol = new SymbolLayerItem( newLayer->subSymbol() );
SymbolLayerItem *sublayer = new SymbolLayerItem( newLayer->subSymbol()->symbolLayer( 0 ) );
subsymbol->appendRow( sublayer );
item->appendRow( subsymbol );
*/
loadSymbol( newLayer->subSymbol(), item );
layersTree->setExpanded( item->index(), true );
}

// Change the symbol at last to avoid deleting item's layer
@@ -7,13 +7,16 @@
<x>0</x>
<y>0</y>
<width>336</width>
<height>326</height>
<height>336</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
@@ -106,7 +109,7 @@
<item row="6" column="0" colspan="2">
<widget class="QListWidget" name="mShapeListWidget">
<property name="dragDropMode">
<enum>QAbstractItemView::DropOnly</enum>
<enum>QAbstractItemView::NoDragDrop</enum>
</property>
<property name="iconSize">
<size>
@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>1</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<property name="sizeConstraint">
@@ -13,34 +13,13 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Symbol Layer Properties</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QStackedWidget" name="stackedWidget">
<widget class="QWidget" name="pageDummy">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string> This layer doen't have any editbale properties</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>3</number>
</property>
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -62,6 +41,24 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QStackedWidget" name="stackedWidget">
<widget class="QWidget" name="pageDummy">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string> This layer doesn't have any editbale properties</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
@@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>366</width>
<width>368</width>
<height>242</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>1</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>236</width>
<height>151</height>
<width>201</width>
<height>202</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mAngleLabel">
<property name="text">
@@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>352</width>
<width>263</width>
<height>281</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="mHorizontalDistanceSpinBox">
<property name="decimals">
@@ -7,13 +7,16 @@
<x>0</x>
<y>0</y>
<width>335</width>
<height>206</height>
<height>212</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>1</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@@ -6,14 +6,17 @@
<rect>
<x>0</x>
<y>0</y>
<width>358</width>
<width>368</width>
<height>296</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>1</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0" colspan="2">
<layout class="QGridLayout">
<item row="0" column="0">
@@ -250,20 +250,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnAddToStyle">
<property name="text">
<string>Save as style</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnStyleManager">
<property name="text">
<string>Style manager...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
@@ -325,6 +311,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="btnStyle">
<property name="text">
<string>Style</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnAdvanced">
<property name="text">
@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<property name="margin">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="mXAttributeLabel">
<property name="text">

0 comments on commit 63eba56

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