2013-11-12 20:24:19 +01:00
|
|
|
#ifndef FEEDSMODEL_H
|
|
|
|
#define FEEDSMODEL_H
|
|
|
|
|
|
|
|
#include <QAbstractItemModel>
|
2013-12-12 15:07:17 +01:00
|
|
|
#include <QIcon>
|
2013-11-12 20:24:19 +01:00
|
|
|
|
|
|
|
|
2013-12-11 15:00:15 +01:00
|
|
|
class FeedsModelRootItem;
|
|
|
|
|
2013-11-12 20:24:19 +01:00
|
|
|
class FeedsModel : public QAbstractItemModel {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-12-11 18:54:09 +01:00
|
|
|
// Constructors and destructors.
|
2013-11-12 20:24:19 +01:00
|
|
|
explicit FeedsModel(QObject *parent = 0);
|
2013-12-11 14:07:18 +01:00
|
|
|
virtual ~FeedsModel();
|
2013-11-12 20:24:19 +01:00
|
|
|
|
2013-12-11 18:54:09 +01:00
|
|
|
QVariant data(const QModelIndex &index, int role) const;
|
|
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
|
|
|
QModelIndex index(int row, int column, const QModelIndex &parent) const;
|
|
|
|
QModelIndex parent(const QModelIndex &child) const;
|
|
|
|
int columnCount(const QModelIndex &parent) const;
|
|
|
|
int rowCount(const QModelIndex &parent) const;
|
2013-11-12 20:24:19 +01:00
|
|
|
|
|
|
|
|
2013-12-11 15:00:15 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
FeedsModelRootItem *m_rootItem;
|
2013-12-12 15:07:17 +01:00
|
|
|
QList<QString> m_headerData;
|
|
|
|
QIcon m_countsIcon;
|
2013-12-11 15:00:15 +01:00
|
|
|
|
2013-11-12 20:24:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FEEDSMODEL_H
|