Fix tracing. Fix restoring previous position.
[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 ProgressDialog;
15 class Book;
16 class InfoWindow;
17 class SortedLibrary;
18 class SearchDialog;
19
20 /** Manage library. */
21 class LibraryDialog: public ListWindow
22 {
23     Q_OBJECT
24
25 public:
26     explicit LibraryDialog(QWidget *parent = 0);
27
28 public slots:
29     void onAdd();
30     void onAddFolder();
31 #ifndef Q_WS_MAEMO_5
32     void onRemove();
33     void onDetails();
34     void onRead();
35 #endif // Q_WS_MAEMO_5
36     void onBookAdded();
37     void onItemActivated(const QModelIndex &index);
38     void onCurrentBookChanged();
39     void onAddFromFolder(const QString &path);
40     void onAddFromFolderDone(int added);
41     void onSearch();
42     void showSearchResults();
43
44 private:
45     QString createItemText(const Book *book);
46     void setSelected(const QModelIndex &index);
47     QModelIndex selected() const;
48     ListView *list;
49     SortedLibrary *sortedLibrary;
50     ProgressDialog *progress;
51     SearchDialog *searchDialog;
52 };
53
54 #endif // LIBRARYDIALOG_H