#pragma once #include "core.hpp" #include #include class ProfileList final : public QAbstractListModel { public: ProfileList(QObject *parent = nullptr); ~ProfileList() override; void add(Rust &&p); int rowCount(const QModelIndex &parent = QModelIndex()) const override; Profile *get(size_t i) const { return m_items[i]; } QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override; private: std::vector> m_items; };