#include <QDialog>
#include <QString>
#include <QModelIndexList>
-#include <QMainWindow>
-class QListView;
+#include "listwindow.h"
+
+class ListView;
class QPushButton;
class QModelIndex;
class QCloseEvent;
+class QProgressDialog;
class Book;
class InfoWindow;
class SortedLibrary;
+class SearchDialog;
-class LibraryDialog: public QMainWindow
+/** Manage library. */
+class LibraryDialog: public ListWindow
{
Q_OBJECT
public slots:
void onAdd();
+ void onAddFolder();
#ifndef Q_WS_MAEMO_5
void onRemove();
void onDetails();
void onRead();
- void onItemSelectionChanged();
#endif // Q_WS_MAEMO_5
void onBookAdded();
void onItemActivated(const QModelIndex &index);
void onCurrentBookChanged();
-
-protected:
- void closeEvent(QCloseEvent *event);
+ void onAddFromFolder(const QString &path);
+ void onAddFromFolderDone(int added);
+ void onSearch();
private:
QString createItemText(const Book *book);
void setSelected(const QModelIndex &index);
QModelIndex selected() const;
- QListView *list;
+ ListView *list;
SortedLibrary *sortedLibrary;
-#ifndef Q_WS_MAEMO_5
- QPushButton *detailsButton;
- QPushButton *removeButton;
- QPushButton *readButton;
-#endif // Q_WS_MAEMO_5
- QPushButton *addButton;
+ QProgressDialog *progress;
+ SearchDialog *searchDialog;
};
#endif // LIBRARYDIALOG_H