3#ifndef BOOKMARKFILTERMODEL_H
4#define BOOKMARKFILTERMODEL_H
6#include <QtCore/QPersistentModelIndex>
8#include <QtCore/QAbstractProxyModel>
9#include <QtCore/QSortFilterProxyModel>
26 int rowCount(
const QModelIndex &index)
const override;
27 int columnCount(
const QModelIndex &index)
const override;
33 QModelIndex index(
int row,
int column,
const QModelIndex &parent)
const override;
38 QVariant data(
const QModelIndex &index,
int role)
const override;
39 bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
46 void rowsInserted(
const QModelIndex &parent,
int start,
int end);
47 void rowsAboutToBeRemoved(
const QModelIndex &parent,
int start,
int end);
48 void rowsRemoved(
const QModelIndex &parent,
int start,
int end);
49 void layoutAboutToBeChanged();
51 void modelAboutToBeReset();
55 void setupCache(
const QModelIndex &parent);
56 void collectItems(
const QModelIndex &parent);
61 QPersistentModelIndex indexToRemove;
62 bool hideBookmarks =
true;
72 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
75 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const override;
QList< QPersistentModelIndex > PersistentModelIndexCache
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.
void setItemsEditable(bool editable)
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.