Skip to content

Commit 63eba56

Browse files
author
Arunmozhi
committed
fixed the symbol editor tweaks"
"
1 parent b1c4a83 commit 63eba56

16 files changed

+87
-59
lines changed

src/gui/symbology-ng/qgssymbolslistwidget.cpp

+10-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,16 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty
5353
viewSymbols->setModel( model );
5454
connect( viewSymbols, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( setSymbolFromStyle( const QModelIndex & ) ) );
5555

56-
connect( btnStyleManager, SIGNAL( clicked() ), SLOT( openStyleManager() ) );
56+
// Set the Style Menu under btnStyle
57+
QMenu *styleMenu = new QMenu( btnStyle );
58+
QAction *styleMgrAction = new QAction( "Style Manager", styleMenu );
59+
styleMenu->addAction( styleMgrAction );
60+
QAction *saveStyle = new QAction( "Save as style", styleMenu );
61+
styleMenu->addAction( saveStyle );
62+
connect( styleMgrAction, SIGNAL( triggered() ), this, SLOT( openStyleManager() ) );
63+
connect( saveStyle, SIGNAL( triggered() ), this, SLOT( addSymbolToStyle() ) );
64+
btnStyle->setMenu( styleMenu );
65+
5766
lblSymbolName->setText( "" );
5867
populateSymbolView();
5968

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

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

8592
// Set symbol color in btnColor
8693
updateSymbolColor();

src/gui/symbology-ng/qgssymbolv2selectordialog.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,8 @@ void QgsSymbolV2SelectorDialog::changeLayer( QgsSymbolLayerV2* newLayer )
495495
// When it is a marker symbol
496496
if ( newLayer->subSymbol() )
497497
{
498-
/*
499-
SymbolLayerItem *subsymbol = new SymbolLayerItem( newLayer->subSymbol() );
500-
SymbolLayerItem *sublayer = new SymbolLayerItem( newLayer->subSymbol()->symbolLayer( 0 ) );
501-
subsymbol->appendRow( sublayer );
502-
item->appendRow( subsymbol );
503-
*/
504498
loadSymbol( newLayer->subSymbol(), item );
499+
layersTree->setExpanded( item->index(), true );
505500
}
506501

507502
// Change the symbol at last to avoid deleting item's layer

src/ui/symbollayer/widget_ellipse.ui

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
<x>0</x>
88
<y>0</y>
99
<width>336</width>
10-
<height>326</height>
10+
<height>336</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout_2">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0">
1821
<widget class="QTabWidget" name="tabWidget">
1922
<property name="currentIndex">
@@ -106,7 +109,7 @@
106109
<item row="6" column="0" colspan="2">
107110
<widget class="QListWidget" name="mShapeListWidget">
108111
<property name="dragDropMode">
109-
<enum>QAbstractItemView::DropOnly</enum>
112+
<enum>QAbstractItemView::NoDragDrop</enum>
110113
</property>
111114
<property name="iconSize">
112115
<size>

src/ui/symbollayer/widget_fontmarker.ui

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<string>Form</string>
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item>
1821
<layout class="QGridLayout" name="gridLayout">
1922
<property name="sizeConstraint">

src/ui/symbollayer/widget_layerproperties.ui

+25-28
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,13 @@
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
16-
<layout class="QGridLayout" name="gridLayout_2">
17-
<item row="1" column="0">
18-
<widget class="QGroupBox" name="groupBox">
19-
<property name="title">
20-
<string>Symbol Layer Properties</string>
21-
</property>
22-
<layout class="QGridLayout" name="gridLayout">
23-
<item row="0" column="0">
24-
<widget class="QStackedWidget" name="stackedWidget">
25-
<widget class="QWidget" name="pageDummy">
26-
<layout class="QVBoxLayout" name="verticalLayout">
27-
<item>
28-
<widget class="QLabel" name="label_2">
29-
<property name="text">
30-
<string> This layer doen't have any editbale properties</string>
31-
</property>
32-
<property name="alignment">
33-
<set>Qt::AlignCenter</set>
34-
</property>
35-
</widget>
36-
</item>
37-
</layout>
38-
</widget>
39-
</widget>
40-
</item>
41-
</layout>
42-
</widget>
43-
</item>
16+
<layout class="QGridLayout" name="gridLayout">
17+
<property name="verticalSpacing">
18+
<number>3</number>
19+
</property>
20+
<property name="margin">
21+
<number>1</number>
22+
</property>
4423
<item row="0" column="0">
4524
<layout class="QHBoxLayout" name="horizontalLayout">
4625
<item>
@@ -62,6 +41,24 @@
6241
</item>
6342
</layout>
6443
</item>
44+
<item row="1" column="0">
45+
<widget class="QStackedWidget" name="stackedWidget">
46+
<widget class="QWidget" name="pageDummy">
47+
<layout class="QVBoxLayout" name="verticalLayout">
48+
<item>
49+
<widget class="QLabel" name="label_2">
50+
<property name="text">
51+
<string> This layer doesn't have any editbale properties</string>
52+
</property>
53+
<property name="alignment">
54+
<set>Qt::AlignCenter</set>
55+
</property>
56+
</widget>
57+
</item>
58+
</layout>
59+
</widget>
60+
</widget>
61+
</item>
6562
</layout>
6663
</widget>
6764
<resources/>

src/ui/symbollayer/widget_linedecoration.ui

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>366</width>
9+
<width>368</width>
1010
<height>242</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item>
1821
<layout class="QGridLayout" name="gridLayout">
1922
<item row="0" column="0">

src/ui/symbollayer/widget_linepatternfill.ui

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>236</width>
10-
<height>151</height>
9+
<width>201</width>
10+
<height>202</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0">
1821
<widget class="QLabel" name="mAngleLabel">
1922
<property name="text">

src/ui/symbollayer/widget_markerline.ui

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>352</width>
9+
<width>263</width>
1010
<height>281</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0" colspan="2">
1821
<widget class="QLabel" name="label_2">
1922
<property name="text">

src/ui/symbollayer/widget_pointpatternfill.ui

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="1">
1821
<widget class="QDoubleSpinBox" name="mHorizontalDistanceSpinBox">
1922
<property name="decimals">

src/ui/symbollayer/widget_simplefill.ui

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
<x>0</x>
88
<y>0</y>
99
<width>335</width>
10-
<height>206</height>
10+
<height>212</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item>
1821
<layout class="QGridLayout" name="gridLayout">
1922
<item row="0" column="0">

src/ui/symbollayer/widget_simpleline.ui

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>358</width>
9+
<width>368</width>
1010
<height>296</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout_2">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0">
1821
<layout class="QGridLayout" name="gridLayout">
1922
<item row="0" column="0">

src/ui/symbollayer/widget_simplemarker.ui

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<string>Form</string>
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item>
1821
<layout class="QGridLayout" name="gridLayout">
1922
<item row="0" column="0">

src/ui/symbollayer/widget_svgfill.ui

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout_3">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0">
1821
<layout class="QGridLayout" name="gridLayout">
1922
<item row="0" column="0">

src/ui/symbollayer/widget_svgmarker.ui

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0" colspan="2">
1821
<layout class="QGridLayout">
1922
<item row="0" column="0">

src/ui/symbollayer/widget_symbolslist.ui

+7-14
Original file line numberDiff line numberDiff line change
@@ -250,20 +250,6 @@
250250
</property>
251251
</spacer>
252252
</item>
253-
<item>
254-
<widget class="QPushButton" name="btnAddToStyle">
255-
<property name="text">
256-
<string>Save as style</string>
257-
</property>
258-
</widget>
259-
</item>
260-
<item>
261-
<widget class="QPushButton" name="btnStyleManager">
262-
<property name="text">
263-
<string>Style manager...</string>
264-
</property>
265-
</widget>
266-
</item>
267253
</layout>
268254
</item>
269255
<item row="2" column="0">
@@ -325,6 +311,13 @@
325311
</property>
326312
</spacer>
327313
</item>
314+
<item>
315+
<widget class="QPushButton" name="btnStyle">
316+
<property name="text">
317+
<string>Style</string>
318+
</property>
319+
</widget>
320+
</item>
328321
<item>
329322
<widget class="QPushButton" name="btnAdvanced">
330323
<property name="text">

src/ui/symbollayer/widget_vectorfield.ui

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<string>Form</string>
1515
</property>
1616
<layout class="QGridLayout" name="gridLayout_4">
17+
<property name="margin">
18+
<number>1</number>
19+
</property>
1720
<item row="0" column="0">
1821
<widget class="QLabel" name="mXAttributeLabel">
1922
<property name="text">

0 commit comments

Comments
 (0)