Skip to content
Permalink
Browse files

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/qgis@14422 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Oct 20, 2010
1 parent 56b03d8 commit 62fae4f31d1d81c3fdb5a041aa5c580c883c9c57
@@ -2,6 +2,7 @@
#include "qgssymbolv2selectordialog.h"

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

#include "qgssymbolv2.h"
#include "qgssymbollayerv2utils.h"
@@ -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 );
@@ -276,3 +277,11 @@ QMenu* QgsSymbolV2SelectorDialog::advancedMenu()
}
return mAdvancedMenu;
}

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

populateSymbolView();
}
@@ -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();

@@ -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">
@@ -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">
@@ -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/>

0 comments on commit 62fae4f

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