Commit f0139298 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] styled select-all button for WPropertySelectionWidget

parent 5fa62de4
......@@ -28,15 +28,17 @@
#include <QtGui/QPalette>
#include <QtGui/QListWidgetItem>
#include <QtGui/QPushButton>
#include <QtGui/QToolButton>
#include <QtGui/QScrollBar>
#include "core/common/WLogger.h"
#include "core/common/WPropertyVariable.h"
#include "core/common/WItemSelector.h"
#include "core/common/WItemSelection.h"
#include "../WGuiConsts.h"
#include "../WQt4Gui.h"
#include "../WMainWindow.h"
#include "WPropertySelectionWidget.h"
#include "WPropertySelectionWidget.moc"
......@@ -96,8 +98,13 @@ WPropertySelectionWidget::WPropertySelectionWidget( WPropSelection property, QGr
m_layout.addWidget( m_list, 0, 0 );
// add a select-all button
QPushButton* selAllButton = new QPushButton( "Select All", this );
connect( selAllButton, SIGNAL( released() ), m_list, SLOT( selectAll() ) );
QToolButton* selAllButton = new QToolButton( this );
QAction* act = new QAction( WQt4Gui::getMainWindow()->getIconManager()->getIcon( "select_all" ), "Select All", this );
connect( act, SIGNAL( triggered( bool ) ), m_list, SLOT( selectAll() ) );
selAllButton->setDefaultAction( act );
selAllButton->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
selAllButton->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
m_layout.addWidget( selAllButton, 1, 0 );
// connect
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment