611 changes: 411 additions & 200 deletions src/gui/symbology-ng/qgssymbolv2selectordialog.cpp

Large diffs are not rendered by default.

68 changes: 47 additions & 21 deletions src/gui/symbology-ng/qgssymbolv2selectordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@

#include "ui_qgssymbolv2selectordialogbase.h"

#include <QStandardItemModel>

class QgsStyleV2;
class QgsSymbolV2;
class QgsSymbolLayerV2;
class QgsVectorLayer;

class QMenu;
class QWidget;

class SymbolLayerItem;

class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymbolV2SelectorDialogBase
{
Expand All @@ -37,39 +43,59 @@ class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymb
QMenu* advancedMenu();

protected:
void populateSymbolView();
void updateSymbolPreview();
void updateSymbolColor();
void updateSymbolInfo();

//! Reimplements dialog keyPress event so we can ignore it
void keyPressEvent( QKeyEvent * event );

private:
/**Displays alpha value as transparency in mTransparencyLabel*/
void displayTransparency( double alpha );
void loadSymbol();
void loadSymbol( QgsSymbolV2* symbol, SymbolLayerItem* parent );

public slots:
void changeSymbolProperties();
void setSymbolFromStyle( const QModelIndex & index );
void setSymbolColor();
void setMarkerAngle( double angle );
void setMarkerSize( double size );
void setLineWidth( double width );
void addSymbolToStyle();
void on_mSymbolUnitComboBox_currentIndexChanged( const QString & text );
void on_mTransparencySlider_valueChanged( int value );

void openStyleManager();
void populateLayerTypes( QgsSymbolV2* symbol );

void updateUi();

//void loadPropertyWidgets();

//void updateSymbolLayerWidget( QgsSymbolLayerV2* layer );
void updateLockButton();

SymbolLayerItem* currentLayerItem();
QgsSymbolLayerV2* currentLayer();

void moveLayerByOffset( int offset );

void setWidget( QWidget* widget );

signals:
void symbolModified();

protected:
public slots:
void moveLayerDown();
void moveLayerUp();

void addLayer();
void removeLayer();

void lockLayer();

void layerTypeChanged();

void layerChanged();

void updateLayerPreview();
void updatePreview();

void symbolChanged();


protected: // data
QgsStyleV2* mStyle;
QgsSymbolV2* mSymbol;
QMenu* mAdvancedMenu;
const QgsVectorLayer* mVectorLayer;

QStandardItemModel* model;
QWidget *mPresentWidget;

};

#endif
40 changes: 20 additions & 20 deletions src/ui/qgssymbolv2propertiesdialogbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>674</width>
<width>597</width>
<height>396</height>
</rect>
</property>
Expand Down Expand Up @@ -68,10 +68,13 @@
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Symbol layers</string>
<item row="5" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
Expand Down Expand Up @@ -205,13 +208,10 @@
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Symbol layers</string>
</property>
</widget>
</item>
Expand All @@ -237,32 +237,32 @@
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<signal>rejected()</signal>
<receiver>DlgSymbolV2Properties</receiver>
<slot>accept()</slot>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>257</x>
<x>325</x>
<y>386</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<signal>accepted()</signal>
<receiver>DlgSymbolV2Properties</receiver>
<slot>reject()</slot>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>325</x>
<x>257</x>
<y>386</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<x>157</x>
<y>274</y>
</hint>
</hints>
Expand Down
376 changes: 67 additions & 309 deletions src/ui/qgssymbolv2selectordialogbase.ui

Large diffs are not rendered by default.