| 6 | #include <QAbstractListModel> |
| 7 | |
| 8 | class DevicePathProxyModel: public QAbstractListModel |
| 9 | { |
| 10 | Q_OBJECT |
| 11 | |
| 12 | public: |
| 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 | |
| 33 | private: |
| 34 | BootEntryListModel *boot_entry_list_model = nullptr; |
| 35 | QModelIndex boot_entry_index = {}; |
| 36 | const QVector<FilePath::ANY> *boot_entry_device_path = nullptr; |
| 37 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected