Skip to content
Permalink
Browse files

Midway commit; implements symbols listing/changing in symbol selector

  • Loading branch information
tecoholic committed Jul 9, 2012
1 parent 1d770bf commit 82dfbaca5176515decbccd96ca7bd92635d4b419
@@ -71,27 +71,34 @@ class QgsSymbolV2SelectorDialog : QDialog //, private Ui::QgsSymbolV2SelectorDia
%TypeHeaderCode
#include <qgssymbolv2selectordialog.h>
%End
public:
QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent = NULL, bool embedded = false );

public:
QgsSymbolV2SelectorDialog(QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent = NULL, bool embedded = false);

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

QMenu* advancedMenu();

public slots:
void changeSymbolProperties();
void setSymbolFromStyle(const QModelIndex & index);
void setSymbolColor();
void setMarkerAngle(double angle);
void setMarkerSize(double size);
void setLineWidth(double width);

signals:
void symbolModified();
protected:
void keyPressEvent( QKeyEvent * event );

void loadSymbol();
void updateUi();
void updateLockButton();
QgsSymbolLayerV2* currentLayer();
void moveLayerByOffset( int offset );
void setWidget( QWidget* widget );

signals:
void symbolModified();

public slots:
void moveLayerDown();
void moveLayerUp();
void addLayer();
void removeLayer();
void lockLayer();
void layerTypeChanged();
void layerChanged();
void updateLayerPreview();
void updatePreview();

};

@@ -46,7 +46,7 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbolV2* symbol, QgsStyleV2* sty

QStandardItemModel* model = new QStandardItemModel( viewSymbols );
viewSymbols->setModel( model );
//connect( viewSymbols, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( setSymbolFromStyle( const QModelIndex & ) ) );
connect( viewSymbols, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( setSymbolFromStyle( const QModelIndex & ) ) );

connect( btnStyleManager, SIGNAL( clicked() ), SLOT( openStyleManager() ) );
lblSymbolName->setText( "" );
@@ -270,7 +270,16 @@ void QgsSymbolsListWidget::setSymbolFromStyle( const QModelIndex & index )
emit changed();
}


QMenu* QgsSymbolsListWidget::advancedMenu()
{
if ( mAdvancedMenu == NULL )
{
mAdvancedMenu = new QMenu;
btnAdvanced->setMenu( mAdvancedMenu );
btnAdvanced->show();
}
return mAdvancedMenu;
}



@@ -22,7 +22,6 @@

class QgsSymbolV2;
class QgsStyleV2;
class QgsVectorLayer;

class QMenu;

@@ -57,7 +56,6 @@ class GUI_EXPORT QgsSymbolsListWidget : public QWidget, private Ui::WidgetSymbol
QgsSymbolV2* mSymbol;
QgsStyleV2* mStyle;
QMenu* mAdvancedMenu;
const QgsVectorLayer* mVectorLayer;

void populateSymbolView();
void updateSymbolColor();

0 comments on commit 82dfbac

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