Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added "style manager..." button to symbol selector so that users will…
… find the style manager more easily.

git-svn-id: http://svn.osgeo.org/qgis/trunk@14422 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Oct 20, 2010
1 parent 7f32157 commit 72c9cdb
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 33 deletions.
11 changes: 10 additions & 1 deletion src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
Expand Up @@ -2,6 +2,7 @@
#include "qgssymbolv2selectordialog.h"

#include "qgssymbolv2propertiesdialog.h"
#include "qgsstylev2managerdialog.h"

#include "qgssymbolv2.h"
#include "qgssymbollayerv2utils.h"
Expand Down Expand Up @@ -34,7 +35,7 @@ QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsSt
}

connect( btnSymbolProperties, SIGNAL( clicked() ), this, SLOT( changeSymbolProperties() ) );

connect( btnStyleManager, SIGNAL( clicked() ), SLOT( openStyleManager() ) );

QStandardItemModel* model = new QStandardItemModel( viewSymbols );
viewSymbols->setModel( model );
Expand Down Expand Up @@ -276,3 +277,11 @@ QMenu* QgsSymbolV2SelectorDialog::advancedMenu()
}
return mAdvancedMenu;
}

void QgsSymbolV2SelectorDialog::openStyleManager()
{
QgsStyleV2ManagerDialog dlg( mStyle, this );
dlg.exec();

populateSymbolView();
}
2 changes: 2 additions & 0 deletions src/gui/symbology-ng/qgssymbolv2selectordialog.h
Expand Up @@ -45,6 +45,8 @@ class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymb
void on_mSymbolUnitComboBox_currentIndexChanged( const QString & text );
void on_mTransparencySlider_valueChanged( int value );

void openStyleManager();

signals:
void symbolModified();

Expand Down
96 changes: 64 additions & 32 deletions src/ui/qgssymbolv2selectordialogbase.ui
Expand Up @@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Symbol selector</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="lblPreview">
<property name="sizePolicy">
Expand Down Expand Up @@ -246,40 +246,71 @@
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Symbols from style</string>
<item row="2" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QListView" name="viewSymbols">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>2</verstretch>
</sizepolicy>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="flow">
<enum>QListView::LeftToRight</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
</widget>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Symbols from style</string>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="btnStyleManager">
<property name="text">
<string>Style manager...</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QListView" name="viewSymbols">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>2</verstretch>
</sizepolicy>
</property>
<property name="iconSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
<property name="flow">
<enum>QListView::LeftToRight</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
Expand All @@ -305,12 +336,13 @@
<tabstop>mSymbolUnitComboBox</tabstop>
<tabstop>mTransparencySlider</tabstop>
<tabstop>btnColor</tabstop>
<tabstop>spinWidth</tabstop>
<tabstop>spinSize</tabstop>
<tabstop>spinAngle</tabstop>
<tabstop>btnAdvanced</tabstop>
<tabstop>btnAddToStyle</tabstop>
<tabstop>btnStyleManager</tabstop>
<tabstop>viewSymbols</tabstop>
<tabstop>spinWidth</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
Expand Down

0 comments on commit 72c9cdb

Please sign in to comment.