2015-11-10 17:08:27 +11:00
|
|
|
/**
|
|
|
|
* The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
|
|
|
|
*
|
|
|
|
* @see QgsBrowserModel
|
|
|
|
* @note added in 2.8
|
|
|
|
*/
|
|
|
|
class QgsBrowserTreeView: QTreeView
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsbrowsertreeview.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
QgsBrowserTreeView( QWidget *parent /TransferThis/ = 0 );
|
|
|
|
~QgsBrowserTreeView();
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
virtual void setModel( QAbstractItemModel *model );
|
|
|
|
virtual void showEvent( QShowEvent *e );
|
|
|
|
virtual void hideEvent( QHideEvent *e );
|
2015-11-10 17:08:27 +11:00
|
|
|
|
|
|
|
// returns true if at least one descendat is expanded, used in refresh
|
2017-05-01 16:42:33 +02:00
|
|
|
bool hasExpandedDescendant( const QModelIndex &index ) const;
|
2015-11-10 17:08:27 +11:00
|
|
|
|
|
|
|
// Set section where to store settings (because we have 2 browser dock widgets)
|
2017-05-01 16:42:33 +02:00
|
|
|
void setSettingsSection( const QString §ion );
|
2015-11-10 17:08:27 +11:00
|
|
|
|
|
|
|
protected slots:
|
2017-05-01 16:42:33 +02:00
|
|
|
virtual void rowsInserted( const QModelIndex &parentIndex, int start, int end );
|
2015-11-10 17:08:27 +11:00
|
|
|
};
|