Update from old repository.
[dorian] / 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 QListWidget;
10 class QListWidgetItem;
11 class QPushButton;
12 class Book;
13 class InfoWindow;
14
15 class LibraryDialog: public QDialog
16 {
17     Q_OBJECT
18
19 public:
20     explicit LibraryDialog(QWidget *parent = 0);
21     QListWidget *list;
22 #ifndef Q_WS_MAEMO_5
23     QPushButton *detailsButton;
24     QPushButton *removeButton;
25     QPushButton *readButton;
26 #endif
27     QPushButton *addButton;
28     QString lastDir;
29
30 public slots:
31     void onAdd();
32 #ifndef Q_WS_MAEMO_5
33     void onRemove();
34     void onDetails();
35     void onRead();
36     void onItemSelectionChanged();
37 #endif
38     void onBookAdded();
39     void onItemActivated(QListWidgetItem *item);
40     void onCurrentBookChanged();
41
42 private:
43     QString createItemText(const Book *book);
44 };
45
46 #endif // LIBRARYDIALOG_H