Skip to content
Permalink
Browse files

Merge pull request #1583 from slarosa/qdockwidget_browser

[browser] small ui reworking for consistency
  • Loading branch information
blazek committed Nov 20, 2014
2 parents a57066a + d80b660 commit 869ad447f24ca1602a058e9167cb215153be171d
Showing with 9 additions and 56 deletions.
  1. +2 −4 src/app/qgsbrowserdockwidget.cpp
  2. +7 −52 src/ui/qgsbrowserdockwidgetbase.ui
@@ -245,9 +245,8 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
mBtnCollapse->setIcon( QgsApplication::getThemeIcon( "mActionCollapseTree.png" ) );

mWidgetFilter->hide();
mLeFilter->setPlaceholderText( tr( "Type here to filter current item..." ) );
// icons from http://www.fatcow.com/free-icons License: CC Attribution 3.0
mBtnFilterShow->setIcon( QgsApplication::getThemeIcon( "mActionFilter.png" ) );
mBtnFilter->setIcon( QgsApplication::getThemeIcon( "mActionFilter.png" ) );

QMenu* menu = new QMenu( this );
menu->setSeparatorsCollapsible( false );
@@ -280,10 +279,9 @@ QgsBrowserDockWidget::QgsBrowserDockWidget( QString name, QWidget * parent ) :
connect( mBtnAddLayers, SIGNAL( clicked() ), this, SLOT( addSelectedLayers() ) );
connect( mBtnCollapse, SIGNAL( clicked() ), mBrowserView, SLOT( collapseAll() ) );
connect( mBtnFilterShow, SIGNAL( toggled( bool ) ), this, SLOT( showFilterWidget( bool ) ) );
connect( mBtnFilter, SIGNAL( clicked() ), this, SLOT( setFilter() ) );
connect( mLeFilter, SIGNAL( returnPressed() ), this, SLOT( setFilter() ) );
connect( mLeFilter, SIGNAL( cleared() ), this, SLOT( setFilter() ) );
// connect( mLeFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( setFilter() ) );
connect( mLeFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( setFilter() ) );
connect( group, SIGNAL( triggered( QAction * ) ), this, SLOT( setFilterSyntax( QAction * ) ) );

connect( mBrowserView, SIGNAL( customContextMenuRequested( const QPoint & ) ), this, SLOT( showContextMenu( const QPoint & ) ) );
@@ -24,13 +24,13 @@
<item>
<layout class="QHBoxLayout" name="mLayoutHeader">
<property name="spacing">
<number>5</number>
<number>6</number>
</property>
<property name="leftMargin">
<number>5</number>
<number>0</number>
</property>
<property name="rightMargin">
<number>5</number>
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="mBtnRefresh">
@@ -58,14 +58,14 @@
<string>Add Selected Layers</string>
</property>
<property name="text">
<string>Add</string>
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionAdd.svg</normaloff>:/images/themes/default/mActionAdd.svg</iconset>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
@@ -148,7 +148,7 @@
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
@@ -192,33 +192,10 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="mBtnFilter">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Filter files</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionFilter.png</normaloff>:/images/themes/default/mActionFilter.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QgsFilterLineEdit" name="mLeFilter">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -229,12 +206,6 @@
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
@@ -246,22 +217,6 @@
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>

0 comments on commit 869ad44

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