6 #include <QStyledItemDelegate>
9 #include <QDialogButtonBox>
10 #include <QPushButton>
13 #include "googlereader.h"
15 class FeedsWindow : public QMainWindow {
19 FeedsWindow(QWidget *parent = 0);
20 virtual ~FeedsWindow();
23 void showUpdated(bool);
27 void feedSelected(const QModelIndex &);
29 void loginFailed(QString);
36 QAction *show_updated;
40 class FeedListModel : public QAbstractListModel {
44 FeedListModel(QObject *parent = 0, QList<Feed *>list = QList<Feed *>(), bool updated = false)
45 : QAbstractListModel(parent) {
47 show_updated = updated;
50 int rowCount(const QModelIndex &model = QModelIndex()) const;
52 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
55 void showUpdated(bool);
58 QList<Feed *> feed_list;
62 class FeedListDelegate : public QStyledItemDelegate {
66 FeedListDelegate(QObject *parent = 0)
67 : QStyledItemDelegate(parent) {};
69 void paint(QPainter *painter, const QStyleOptionViewItem &option,
70 const QModelIndex &index) const;
73 class SettingsDialog : public QDialog {
77 SettingsDialog(QWidget *parent = 0, QSettings *s = 0);
86 QLineEdit *passwdEdit;
87 QDialogButtonBox *buttonBox;
88 QPushButton *saveButton;
89 QPushButton *cancelButton;