21#include <QAbstractItemModel>
22#include <QSortFilterProxyModel>
37 IdRole = Qt::UserRole + 1,
38 TitleRole = Qt::UserRole + 2,
39 UrlRole = Qt::UserRole + 3,
40 UrlStringRole = Qt::UserRole + 4,
41 IconRole = Qt::UserRole + 5,
42 IsTopLevelRole = Qt::UserRole + 7,
43 TimestampStartRole = Qt::UserRole + 8,
44 TimestampEndRole = Qt::UserRole + 9,
45 MaxRole = TimestampEndRole
50 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
51 QVariant data(
const QModelIndex &index,
int role)
const override;
52 bool setData(
const QModelIndex &index,
const QVariant &
value,
int role)
override;
54 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
55 QModelIndex parent(
const QModelIndex &child)
const override;
56 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
58 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
59 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
61 bool canFetchMore(
const QModelIndex &parent)
const override;
62 void fetchMore(
const QModelIndex &parent)
override;
64 bool hasChildren(
const QModelIndex &parent)
const override;
66 HistoryItem* itemFromIndex(
const QModelIndex &index)
const;
68 void removeTopLevelIndexes(
const QList<QPersistentModelIndex> &indexes);
92 bool isPatternEmpty()
const;
95 void setFilterFixedString(
const QString &pattern);
102 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const override;
105 void startFiltering();
109 QTimer* m_filterTimer;
int value(const QColor &c)