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