ResourcesBrowser: improved item filtering
Filter line-edit is now placed above actual tree view and has been decorated with a small icon as well as a status label, displaying the number of filtered and total number of items. Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "side_bar_widget.h"
|
||||
|
||||
class QAction;
|
||||
class QLabel;
|
||||
class ResourcesItem;
|
||||
class ResourcesTreeModel;
|
||||
class ResourcesTreeView;
|
||||
@@ -58,6 +59,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void showContextMenu( const QPoint & _pos );
|
||||
void updateFilterStatus();
|
||||
|
||||
|
||||
private:
|
||||
@@ -68,6 +70,8 @@ private:
|
||||
ResourcesTreeModel * m_treeModel;
|
||||
ResourcesTreeView * m_treeView;
|
||||
|
||||
QLabel * m_filterStatusLabel;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -159,6 +159,11 @@ public:
|
||||
return m_treeItem;
|
||||
}
|
||||
|
||||
const ResourcesTreeItem * treeItem( void ) const
|
||||
{
|
||||
return m_treeItem;
|
||||
}
|
||||
|
||||
const QDateTime & lastMod( void ) const
|
||||
{
|
||||
return m_lastMod;
|
||||
|
||||
@@ -75,6 +75,9 @@ public:
|
||||
return treeItem( _idx )->item();
|
||||
}
|
||||
|
||||
int totalItems() const;
|
||||
int shownItems() const;
|
||||
|
||||
|
||||
private:
|
||||
bool filterItems( ResourcesTreeItem * _item,
|
||||
|
||||
Reference in New Issue
Block a user