1 #ifndef _ENTRIES_WINDOW_H
2 #define _ENTRIES_WINDOW_H
6 #include <QStyledItemDelegate>
7 #include "googlereader.h"
8 #include "contentwindow.h"
10 class EntriesWindow : public QMainWindow {
14 EntriesWindow(QWidget *parent = 0, Feed *f = 0);
15 virtual ~EntriesWindow();
20 void entriesUpdated();
21 void entrySelected(const QModelIndex &);
28 QAction *show_updated;
31 ContentWindow *content;
34 class EntryListModel : public QAbstractListModel {
38 EntryListModel(QObject *parent = 0, QList<Entry *>list = QList<Entry *>(), bool updated = false)
39 : QAbstractListModel(parent) {
41 show_updated = updated;
44 int rowCount(const QModelIndex &model = QModelIndex()) const;
46 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
49 void showUpdated(bool);
52 QList<Entry *> entry_list;
56 class EntryListDelegate : public QStyledItemDelegate {
60 EntryListDelegate(QObject *parent = 0)
61 : QStyledItemDelegate(parent) {};
63 void paint(QPainter *painter, const QStyleOptionViewItem &option,
64 const QModelIndex &index) const;