MCPcopy Create free account
hub / github.com/Neverous/efibooteditor / DevicePathProxyModel

Class DevicePathProxyModel

include/devicepathproxymodel.h:8–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include <QAbstractListModel>
7
8class DevicePathProxyModel: public QAbstractListModel
9{
10 Q_OBJECT
11
12public:
13 explicit DevicePathProxyModel(QObject *parent = nullptr);
14 DevicePathProxyModel(const DevicePathProxyModel &) = delete;
15 DevicePathProxyModel &operator=(const DevicePathProxyModel &) = delete;
16
17 void setBootEntryListModel(BootEntryListModel &model);
18 void setBootEntryItem(const QModelIndex &index, const BootEntry *item);
19
20 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
21
22 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
23 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
24
25 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
26
27 bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
28
29 bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
30
31 void clear();
32
33private:
34 BootEntryListModel *boot_entry_list_model = nullptr;
35 QModelIndex boot_entry_index = {};
36 const QVector<FilePath::ANY> *boot_entry_device_path = nullptr;
37};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected