Skip to content

Commit

Permalink
[style dock] Add icons for style manager dialog
Browse files Browse the repository at this point in the history
Remove save for now until next release
  • Loading branch information
NathanW2 committed Jul 6, 2016
1 parent 123607b commit af3ad83
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/gui/qgsmaplayerstylemanagerwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,23 @@ QgsMapLayerStyleManagerWidget::QgsMapLayerStyleManagerWidget( QgsMapLayer* layer

QToolBar* toolbar = new QToolBar( this );
QAction* addAction = toolbar->addAction( tr( "Add" ) );
addAction->setIcon( QgsApplication::getThemeIcon( "symbologyAdd.svg" ) );
connect( addAction, SIGNAL( triggered() ), this, SLOT( addStyle() ) );
QAction* removeAction = toolbar->addAction( tr( "Remove Current" ) );
removeAction->setIcon( QgsApplication::getThemeIcon( "symbologyRemove.svg" ) );
connect( removeAction, SIGNAL( triggered() ), this, SLOT( removeStyle() ) );
QAction* loadFromFileAction = toolbar->addAction( tr( "Load Style" ) );
loadFromFileAction->setIcon( QgsApplication::getThemeIcon( "/mActionFileOpen.svg" ) );
connect( loadFromFileAction, SIGNAL( triggered() ), this, SLOT( loadStyle() ) );
QAction* saveAsDefaultAction = toolbar->addAction( tr( "Save as default" ) );
connect( saveAsDefaultAction, SIGNAL( triggered() ), this, SLOT( saveAsDefault() ) );
QAction* loadDefaultAction = toolbar->addAction( tr( "Restore default" ) );
connect( loadDefaultAction, SIGNAL( triggered() ), this, SLOT( loadDefault() ) );

QAction* loadFromFileAction = toolbar->addAction( tr( "Load Style" ) );
connect( loadFromFileAction, SIGNAL( triggered() ), this, SLOT( loadStyle() ) );

QAction* saveToFileAction = toolbar->addAction( tr( "Save Style" ) );
connect( saveToFileAction, SIGNAL( triggered() ), this, SLOT( saveStyle() ) );
// Save style doesn't work correctly yet so just disable for now.
// QAction* saveToFileAction = toolbar->addAction( tr( "Save Style" ) );
// connect( saveToFileAction, SIGNAL( triggered() ), this, SLOT( saveStyle() ) );

connect( canvas, SIGNAL( mapCanvasRefreshed() ), this, SLOT( updateCurrent() ) );

Expand Down

0 comments on commit af3ad83

Please sign in to comment.