Improve traces. Simplify folder management.
[dorian] / librarydialog.h
1 #ifndef LIBRARYDIALOG_H
2 #define LIBRARYDIALOG_H
3
4 #include <QDialog>
5 #include <QString>
6 #include <QModelIndexList>
7
8 #include "listwindow.h"
9
10 class ListView;
11 class QPushButton;
12 class QModelIndex;
13 class QCloseEvent;
14 class QProgressDialog;
15 class Book;
16 class InfoWindow;
17 class SortedLibrary;
18
19 class LibraryDialog: public ListWindow
20 {
21     Q_OBJECT
22
23 public:
24     explicit LibraryDialog(QWidget *parent = 0);
25
26 public slots:
27     void onAdd();
28     void onAddFolder();
29 #ifndef Q_WS_MAEMO_5
30     void onRemove();
31     void onDetails();
32     void onRead();
33 #endif // Q_WS_MAEMO_5
34     void onBookAdded();
35     void onItemActivated(const QModelIndex &index);
36     void onCurrentBookChanged();
37     void onAddFromFolder(const QString &path);
38     void onAddFromFolderDone(int added);
39 private:
40     QString createItemText(const Book *book);
41     void setSelected(const QModelIndex &index);
42     QModelIndex selected() const;
43     ListView *list;
44     SortedLibrary *sortedLibrary;
45     QProgressDialog *progress;
46 };
47
48 #endif // LIBRARYDIALOG_H