X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=librarydialog.h;h=52b0deb80a298f21939ab615c40c731a347d6794;hb=ad983260649f01aacdf64f369dbd3c7d8fb2dc40;hp=bef71fc5e2547944be159002af8cce03976be4d5;hpb=9f29e40a91e0adf35bee94726c5e8c925fed059f;p=dorian diff --git a/librarydialog.h b/librarydialog.h index bef71fc..52b0deb 100644 --- a/librarydialog.h +++ b/librarydialog.h @@ -4,17 +4,21 @@ #include #include #include -#include -class QListView; +#include "listwindow.h" + +class ListView; class QPushButton; class QModelIndex; class QCloseEvent; +class ProgressDialog; class Book; class InfoWindow; class SortedLibrary; +class SearchDialog; -class LibraryDialog: public QMainWindow +/** Manage library. */ +class LibraryDialog: public ListWindow { Q_OBJECT @@ -23,31 +27,28 @@ public: 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(); + void showSearchResults(); 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; + ProgressDialog *progress; + SearchDialog *searchDialog; }; #endif // LIBRARYDIALOG_H