6#include <QtCore/QAbstractItemModel>
35 int rowCount(
const QModelIndex &index = QModelIndex())
const override;
36 int columnCount(
const QModelIndex &index = QModelIndex())
const override;
39 QModelIndex index(
int row,
int column,
const QModelIndex &index)
const override;
44 QVariant data(
const QModelIndex &index,
int role)
const override;
45 void setData(
const QModelIndex &index,
const QList<QVariant> &data);
46 bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
47 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
53 bool insertRows(
int position,
int rows,
const QModelIndex &parent)
override;
54 bool removeRows(
int position,
int rows,
const QModelIndex &parent)
override;
57 QMimeData*
mimeData(
const QModelIndexList &indexes)
const override;
58 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
59 int column,
const QModelIndex &parent)
override;
62 void setupCache(
const QModelIndex &parent);
63 QModelIndexList collectItems(
const QModelIndex &parent)
const;
64 void collectItems(
const QModelIndex &parent, qint32 depth,
65 QDataStream *stream)
const;
QList< QPersistentModelIndex > PersistentModelIndexCache
QList< QVariant > DataVector
QMap< BookmarkItem *, QPersistentModelIndex > ItemModelIndexCache
bool eventFilter(QObject *object, QEvent *event) override
Filters events if this object has been installed as an event filter for the watched object.
~BookmarkDialog() override
Qt::DropActions supportedDropActions() const override
QModelIndex mapToSource(const QModelIndex &proxyIndex) const override
Reimplement this function to return the model index in the source model that corresponds to the proxy...
QVariant data(const QModelIndex &index, int role) const override
Returns the data stored under the given role for the item referred to by the index.
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Sets the role data for the item at index to value.
void filterBookmarkFolders()
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override
Reimplement this function to return the model index in the proxy model that corresponds to the source...
QModelIndex index(int row, int column, const QModelIndex &parent) const override
Returns the index of the item in the model specified by the given row, column and parent index.
int rowCount(const QModelIndex &index) const override
Returns the number of rows under the given parent.
int columnCount(const QModelIndex &index) const override
Returns the number of columns for the children of the given parent.
QModelIndex parent(const QModelIndex &child) const override
void setSourceModel(QAbstractItemModel *sourceModel) override
Sets the given sourceModel to be processed by the proxy model.
QVariant data(int column) const
BookmarkItem * child(int number) const
bool insertChildren(bool isFolder, int position, int count)
void addChild(BookmarkItem *child)
void setParent(BookmarkItem *parent)
bool setData(int column, const QVariant &value)
bool removeChildren(int position, int count)
BookmarkItem * parent() const
void setData(const DataVector &data)
BookmarkItem(const DataVector &data, BookmarkItem *parent=nullptr)
void dumpTree(int indent) const
void setItemsEditable(bool editable)
QByteArray bookmarks() const
int columnCount(const QModelIndex &index=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns the data for the given role and section in the header with the specified orientation.
QModelIndex index(int row, int column, const QModelIndex &index) const override
Returns the index of the item in the model specified by the given row, column and parent index.
~BookmarkModel() override
bool insertRows(int position, int rows, const QModelIndex &parent) override
QModelIndex addItem(const QModelIndex &parent, bool isFolder=false)
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
Handles the data supplied by a drag and drop operation that ended with the given action.
BookmarkItem * itemFromIndex(const QModelIndex &index) const
bool removeItem(const QModelIndex &index)
void setData(const QModelIndex &index, const QList< QVariant > &data)
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Sets the role data for the item at index to value.
QStringList mimeTypes() const override
Returns the list of allowed MIME types.
QModelIndex indexFromItem(BookmarkItem *item) const
void expandFoldersIfNeeeded(QTreeView *treeView)
int rowCount(const QModelIndex &index=QModelIndex()) const override
Returns the number of rows under the given parent.
void setBookmarks(const QByteArray &bookmarks)
QVariant data(const QModelIndex &index, int role) const override
Returns the data stored under the given role for the item referred to by the index.
QList< QPersistentModelIndex > indexListFor(const QString &label) const
QModelIndex parent(const QModelIndex &index) const override
QMimeData * mimeData(const QModelIndexList &indexes) const override
Returns an object that contains serialized items of data corresponding to the list of indexes specifi...
Qt::DropActions supportedDropActions() const override
bool removeRows(int position, int rows, const QModelIndex &parent) override
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Returns true if the item in the row indicated by the given source_row and source_parent should be inc...
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
static HelpEngineWrapper & instance()
Combined button and popup list for selecting options.