// SPDX-FileCopyrightText: 2021 Jonah BrĂ¼chert // // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include #include class WebAppManager; class WebAppManagerModel : public QAbstractListModel { Q_OBJECT enum Role { NameRole, IconRole, UrlRole, }; public: explicit WebAppManagerModel(QObject *parent = nullptr); ~WebAppManagerModel(); int rowCount(const QModelIndex &index) const override; QVariant data(const QModelIndex &index, int role) const override; QHash roleNames() const override; Q_INVOKABLE void removeApp(int index); private: WebAppManager &m_webAppMngr; };