Move progress bar to the bottom. Fix disappearing "exit full screen"
[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 class QAction;
20
21 /** Manage library. */
22 class LibraryDialog: public ListWindow
23 {
24     Q_OBJECT
25
26 public:
27     explicit LibraryDialog(QWidget *parent = 0);
28
29 public slots:
30     void onAdd();
31     void onAddFolder();
32 #ifndef Q_WS_MAEMO_5
33     void onRemove();
34     void onDetails();
35     void onRead();
36 #endif // Q_WS_MAEMO_5
37     void onBookAdded();
38     void onItemActivated(const QModelIndex &index);
39     void onCurrentBookChanged();
40     void onAddFromFolder(const QString &path);
41     void onAddFromFolderDone(int added);
42     void onSearch();
43     void showSearchResults();
44     void onSortByAuthor();
45     void onSortByTitle();
46
47 private:
48     QString createItemText(Book *book);
49     void setSelected(const QModelIndex &index);
50     QModelIndex selected() const;
51     ListView *list;
52     SortedLibrary *sortedLibrary;
53     ProgressDialog *progress;
54     SearchDialog *searchDialog;
55     QAction *sortByAuthor;
56     QAction *sortByTitle;
57 };
58
59 #endif // LIBRARYDIALOG_H