FileBrowser: Backup expanded directories and restore that state when the tree is reloaded.
This commit is contained in:
committed by
Johannes Lorenz
parent
96cc5e0e5e
commit
407444ea1d
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void reloadTree( void );
|
||||
void expandItems( QTreeWidgetItem * item=NULL );
|
||||
void expandItems( QTreeWidgetItem * item=NULL, QList<QString> expandedDirs = QList<QString>() );
|
||||
// call with item=NULL to filter the entire tree
|
||||
bool filterItems( const QString & filter, QTreeWidgetItem * item=NULL );
|
||||
void giveFocusToFilter();
|
||||
@@ -87,6 +87,10 @@ public:
|
||||
FileBrowserTreeWidget( QWidget * parent );
|
||||
virtual ~FileBrowserTreeWidget() = default;
|
||||
|
||||
//! This method returns a QList with paths (QString's) of all directories
|
||||
//! that are expanded in the tree.
|
||||
QList<QString> expandedDirs( QTreeWidgetItem * item = nullptr ) const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * e );
|
||||
|
||||
Reference in New Issue
Block a user