Skip to content
Permalink
Browse files
browser: add collapse all button
Signed-off-by: Tim Sutton <tim@linfiniti.com>
  • Loading branch information
etiennesky authored and timlinux committed Mar 31, 2012
1 parent ec005b2 commit 7b8bc5a367a40c8f6e6c2295ac2f1a60c293606f
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/app/qgsbrowserdockwidget.cpp
@@ -86,6 +86,12 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QWidget * parent ) :
addLayersButton->setAutoRaise( true );
connect( addLayersButton, SIGNAL( clicked() ), this, SLOT( addSelectedLayers() ) );

QToolButton* collapseButton = new QToolButton( this );
collapseButton->setIcon( QgisApp::instance()->getThemeIcon( "mActionCollapseTree.png" ) );
collapseButton->setToolTip( tr( "Collapse All" ) );
collapseButton->setAutoRaise( true );
connect( collapseButton, SIGNAL( clicked() ), mBrowserView, SLOT( collapseAll() ) );

QVBoxLayout* layout = new QVBoxLayout();
QHBoxLayout* hlayout = new QHBoxLayout();
layout->setContentsMargins( 0, 0, 0, 0 );
@@ -94,8 +100,12 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QWidget * parent ) :
hlayout->setSpacing( 5 );
hlayout->setAlignment( Qt::AlignLeft );

hlayout->addSpacing( 5 );
hlayout->addWidget( refreshButton );
hlayout->addSpacing( 5 );
hlayout->addWidget( addLayersButton );
hlayout->addStretch( );
hlayout->addWidget( collapseButton );
layout->addLayout( hlayout );
layout->addWidget( mBrowserView );

0 comments on commit 7b8bc5a

Please sign in to comment.