15 #ifndef QGSBROWSERMODEL_H
16 #define QGSBROWSERMODEL_H
18 #include <QAbstractItemModel>
36 virtual Qt::ItemFlags flags(
const QModelIndex &index )
const;
42 virtual QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const;
46 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const;
49 virtual int rowCount(
const QModelIndex &parent = QModelIndex() )
const;
53 virtual int columnCount(
const QModelIndex &parent = QModelIndex() )
const;
56 virtual QModelIndex index(
int row,
int column,
const QModelIndex & parent = QModelIndex() )
const;
63 virtual QModelIndex parent(
const QModelIndex &index )
const;
66 virtual QStringList mimeTypes()
const;
69 virtual QMimeData * mimeData(
const QModelIndexList &indexes )
const;
72 virtual bool dropMimeData(
const QMimeData * data, Qt::DropAction action,
int row,
int column,
const QModelIndex & parent );
74 QgsDataItem *dataItem(
const QModelIndex &idx )
const;
76 bool hasChildren(
const QModelIndex &parent = QModelIndex() )
const;
79 void refresh( QString path );
82 void refresh(
const QModelIndex &index = QModelIndex() );
85 QModelIndex findPath( QString path );
89 bool canFetchMore(
const QModelIndex & parent )
const;
90 void fetchMore(
const QModelIndex & parent );
95 void beginInsertItems(
QgsDataItem *parent,
int first,
int last );
96 void endInsertItems();
97 void beginRemoveItems(
QgsDataItem *parent,
int first,
int last );
98 void endRemoveItems();
100 void addFavouriteDirectory( QString favDir );
101 void removeFavourite(
const QModelIndex &index );
103 void updateProjectHome();
108 void removeRootItems();
115 #endif // QGSBROWSERMODEL_H