mirror of
https://github.com/KDE/kasts.git
synced 2025-02-02 10:26:52 +01:00
34 lines
762 B
C++
34 lines
762 B
C++
/**
|
|
* SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
|
|
* SPDX-FileCopyrightText: 2021 Bart De Vries <bart@mogwai.be>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QAbstractListModel>
|
|
#include <QVariant>
|
|
#include <QHash>
|
|
#include <QObject>
|
|
|
|
#include "feed.h"
|
|
|
|
class EntriesModel : public QAbstractListModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(Feed *feed READ feed CONSTANT)
|
|
|
|
public:
|
|
explicit EntriesModel(Feed *feed);
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
QHash<int, QByteArray> roleNames() const override;
|
|
int rowCount(const QModelIndex &parent) const override;
|
|
|
|
Feed* feed() const;
|
|
|
|
private:
|
|
Feed *m_feed;
|
|
};
|