95d8579d1587e61bbe385b1d2b363fc691cb85c0
[dorian] / librarydialog.h
1 #ifndef LIBRARYDIALOG_H
2 #define LIBRARYDIALOG_H
3
4 #include <QDialog>
5 #include <QString>
6 #include <QModelIndexList>
7
8 class QMainWindow;
9 class QListView;
10 class QPushButton;
11 class QModelIndex;
12 class Book;
13 class InfoWindow;
14 class SortedLibrary;
15
16 class LibraryDialog: public QDialog
17 {
18     Q_OBJECT
19
20 public:
21     explicit LibraryDialog(QWidget *parent = 0);
22     QListView *list;
23     SortedLibrary *sortedLibrary;
24 #ifndef Q_WS_MAEMO_5
25     QPushButton *detailsButton;
26     QPushButton *removeButton;
27     QPushButton *readButton;
28 #endif // Q_WS_MAEMO_5
29     QPushButton *addButton;
30
31 public slots:
32     void onAdd();
33 #ifndef Q_WS_MAEMO_5
34     void onRemove();
35     void onDetails();
36     void onRead();
37     void onItemSelectionChanged();
38 #endif // Q_WS_MAEMO_5
39     void onBookAdded();
40     void onItemActivated(const QModelIndex &index);
41     void onCurrentBookChanged();
42
43 private:
44     QString createItemText(const Book *book);
45 };
46
47 #endif // LIBRARYDIALOG_H