kasts/src/feedsmodel.h

29 lines
755 B
C
Raw Normal View History

2020-02-28 23:25:08 +01:00
/**
2020-08-14 20:56:04 +02:00
* SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
2021-04-08 13:16:36 +02:00
* SPDX-FileCopyrightText: 2021 Bart De Vries <bart@mogwai.be>
2020-02-28 23:25:08 +01:00
*
2020-08-14 20:56:04 +02:00
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
2020-02-28 23:25:08 +01:00
*/
#pragma once
2020-05-26 16:32:07 +02:00
#include <QAbstractListModel>
#include <QHash>
2020-04-18 21:07:49 +02:00
#include <QSqlTableModel>
2020-02-28 23:25:08 +01:00
#include <QUrl>
2020-05-26 16:32:07 +02:00
#include "feed.h"
2020-02-28 23:25:08 +01:00
2020-10-09 13:47:35 +02:00
class FeedsModel : public QAbstractListModel
2020-02-28 23:25:08 +01:00
{
Q_OBJECT
public:
2020-10-09 13:47:35 +02:00
explicit FeedsModel(QObject *parent = nullptr);
2020-02-28 23:25:08 +01:00
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QHash<int, QByteArray> roleNames() const override;
2020-05-26 16:32:07 +02:00
int rowCount(const QModelIndex &parent) const override;
Q_INVOKABLE void removeFeed(int index);
Q_INVOKABLE void refreshAll();
2020-02-28 23:25:08 +01:00
};