13 #ifndef BERRYPERSPECTIVELISTMODEL_H
14 #define BERRYPERSPECTIVELISTMODEL_H
20 #include <QAbstractListModel>
21 #include <QScopedPointer>
25 struct IPerspectiveDescriptor;
26 struct IPerspectiveRegistry;
42 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
43 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
44 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
49 using QAbstractListModel::index;
50 QModelIndex
index(
const QString& perspId)
const;
55 QScopedPointer<Impl> d;
~PerspectiveListModel() override
PerspectiveListModel(IPerspectiveRegistry &perspReg, bool markDefault=true, QObject *parent=nullptr)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
QModelIndex index(const QString &perspId) const
SmartPointer< IPerspectiveDescriptor > perspectiveDescriptor(const QModelIndex &index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QString perspectiveName(const QModelIndex &index) const
Implements transparent reference counting.