10 #ifndef CACHE_PROXY_MODEL_H
11 #define CACHE_PROXY_MODEL_H
15 #include <QIdentityProxyModel>
16 #include <QStandardItemModel>
31 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
32 Qt::ItemFlags flags(
const QModelIndex &index)
const;
33 QVariant headerData(
int section, Qt::Orientation orientation,
34 int role = Qt::DisplayRole)
const;
35 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
36 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
40 mutable QStandardItemModel cache;
42 bool hasModel()
const {
return sourceModel() != &cache; }
45 void resetCacheModel();
Definition: cache_proxy_model.h:26
void setSourceModel(QAbstractItemModel *newSourceModel)
Definition: cache_proxy_model.cpp:81