15 #ifndef QGSBROWSERMODEL_H 16 #define QGSBROWSERMODEL_H 18 #include <QAbstractItemModel> 23 #include <QFutureWatcher> 67 PathRole = Qt::UserRole,
68 CommentRole = Qt::UserRole + 1,
84 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
117 void refresh(
const QString& path );
128 QModelIndex findPath(
const QString& path, Qt::MatchFlag matchFlag = Qt::MatchExactly );
151 void beginInsertItems(
QgsDataItem *parent,
int first,
int last );
152 void endInsertItems();
153 void beginRemoveItems(
QgsDataItem *parent,
int first,
int last );
154 void endRemoveItems();
158 void addFavouriteDirectory(
const QString& favDir );
160 void updateProjectHome();
168 void removeRootItems();
178 #endif // QGSBROWSERMODEL_H
Contains various Favourites directories.
virtual int rowCount(const QModelIndex &parent) const=0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const=0
virtual bool canFetchMore(const QModelIndex &parent) const
QgsFavouritesItem * mFavourites
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
virtual QStringList mimeTypes() const
bool initialized() const
Returns true if the model has been initialized.
QgsDirectoryItem * mProjectHome
QgsDataItem * item() const
virtual QVariant data(const QModelIndex &index, int role) const=0
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
A directory: contains subdirectories and layers.
Base class for all items in the model.
virtual bool hasChildren(const QModelIndex &parent) const
virtual int columnCount(const QModelIndex &parent) const=0
virtual void fetchMore(const QModelIndex &parent)
virtual Qt::ItemFlags flags(const QModelIndex &index) const
QVector< QgsDataItem * > mRootItems