Skip to content
Permalink
Browse files

[Style Dock] Add undo/redo button at the bottom

  • Loading branch information
NathanW2 committed May 10, 2016
1 parent ca914f1 commit 0d399647be96fc70a60f443329d1cea742fff40b
Showing with 13 additions and 1 deletion.
  1. +10 −0 src/app/qgsmapstylingwidget.cpp
  2. +3 −1 src/app/qgsmapstylingwidget.h
@@ -50,7 +50,17 @@ QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QWidget *parent
mLiveApplyCheck = new QCheckBox( "Live update" );
mLiveApplyCheck->setChecked( true );

mUndoButton = new QToolButton( this );
mUndoButton->setIcon( QgsApplication::getThemeIcon( "mActionUndo.png" ) );
mRedoButton = new QToolButton( this );
mRedoButton->setIcon( QgsApplication::getThemeIcon( "mActionRedo.png" ) );

connect( mUndoButton, SIGNAL( pressed() ), mUndoWidget, SLOT( undo() ) );
connect( mRedoButton, SIGNAL( pressed() ), mUndoWidget, SLOT( redo() ) );

QHBoxLayout* bottomLayout = new QHBoxLayout( );
bottomLayout->addWidget( mUndoButton );
bottomLayout->addWidget( mRedoButton );
bottomLayout->addWidget( mButtonBox );
bottomLayout->addWidget( mLiveApplyCheck );
layout->addLayout( bottomLayout );
@@ -1,6 +1,7 @@
#ifndef QGSMAPSTYLESDOCK_H
#define QGSMAPSTYLESDOCK_H

#include <QToolButton>
#include <QWidget>
#include <QLabel>
#include <QTabWidget>
@@ -67,7 +68,8 @@ class APP_EXPORT QgsMapStylingWidget : public QWidget
QgsRendererV2PropertiesDialog* mVectorStyleWidget;
QDialogButtonBox* mButtonBox;
QCheckBox* mLiveApplyCheck;

QToolButton* mUndoButton;
QToolButton* mRedoButton;
};

#endif // QGSMAPSTYLESDOCK_H

0 comments on commit 0d39964

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