3 #include <QAbstractListModel> 19 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
30 QVariant
data(
const QModelIndex &index,
int role)
const;
41 void addItem(std::unique_ptr<GenericListItem> item);
51 std::vector<std::unique_ptr<GenericListItem>> items_;
void clear()
Clears this QuickSwitcherModel of all items. This will delete all GenericListItems added after the la...
Definition: GenericListModel.cpp:37
Definition: Application.cpp:48
Definition: GenericListModel.hpp:9
void addItem(std::unique_ptr< GenericListItem > item)
Add an item to this QuickSwitcherModel. It will be displayed in attached views.
Definition: GenericListModel.cpp:28
QVariant data(const QModelIndex &index, int role) const
Reimplements QAbstractItemModel::data. Currently, the role parameter is not used and an GenericListIt...
Definition: GenericListModel.cpp:15
GenericListModel(QWidget *parent=nullptr)
Definition: GenericListModel.cpp:5
int rowCount(const QModelIndex &parent=QModelIndex()) const
Reimplements QAbstractItemModel::rowCount.
Definition: GenericListModel.cpp:10