Add some documentation. Fix popup button locations on Maemo. Ensure popup buttons...
[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 /** Manage library. */
20 class LibraryDialog: public ListWindow
21 {
22     Q_OBJECT
23
24 public:
25     explicit LibraryDialog(QWidget *parent = 0);
26
27 public slots:
28     void onAdd();
29     void onAddFolder();
30 #ifndef Q_WS_MAEMO_5
31     void onRemove();
32     void onDetails();
33     void onRead();
34 #endif // Q_WS_MAEMO_5
35     void onBookAdded();
36     void onItemActivated(const QModelIndex &index);
37     void onCurrentBookChanged();
38     void onAddFromFolder(const QString &path);
39     void onAddFromFolderDone(int added);
40 private:
41     QString createItemText(const Book *book);
42     void setSelected(const QModelIndex &index);
43     QModelIndex selected() const;
44     ListView *list;
45     SortedLibrary *sortedLibrary;
46     QProgressDialog *progress;
47 };
48
49 #endif // LIBRARYDIALOG_H