X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=librarydialog.h;h=a29a0930203fe4f279d58c1bde0adae54a339c66;hb=6c8d9bb19213aee37517232ef889409200e53ac1;hp=8d224633fac30dcc25919b5a29169d8799e62649;hpb=76446a14739779702a024d207be9fb52da36bd24;p=dorian diff --git a/librarydialog.h b/librarydialog.h index 8d22463..a29a093 100644 --- a/librarydialog.h +++ b/librarydialog.h @@ -5,42 +5,46 @@ #include #include -class QMainWindow; -class QListWidget; -class QListWidgetItem; +#include "listwindow.h" + class QPushButton; +class QModelIndex; +class QCloseEvent; +class ProgressDialog; class Book; class InfoWindow; +class SortedLibrary; +class QAction; +class SearchDialog; -class LibraryDialog: public QDialog +/** Manage library. */ +class LibraryDialog: public ListWindow { Q_OBJECT public: explicit LibraryDialog(QWidget *parent = 0); - QListWidget *list; -#ifndef Q_WS_MAEMO_5 - QPushButton *detailsButton; - QPushButton *removeButton; - QPushButton *readButton; -#endif - QPushButton *addButton; - QString lastDir; public slots: void onAdd(); -#ifndef Q_WS_MAEMO_5 - void onRemove(); - void onDetails(); - void onRead(); - void onItemSelectionChanged(); -#endif + void onAddFolder(); void onBookAdded(); - void onItemActivated(QListWidgetItem *item); - void onCurrentBookChanged(); + void onItemActivated(const QModelIndex &index); + void onAddFromFolder(const QString &path); + void onAddFromFolderDone(int added); + void onSearch(); + void showSearchResults(); + void onSortByAuthor(); + void onSortByTitle(); private: - QString createItemText(const Book *book); + QString createItemText(Book *book); + void setSelected(const QModelIndex &index); + SortedLibrary *sortedLibrary; + ProgressDialog *progress; + QAction *sortByAuthor; + QAction *sortByTitle; + SearchDialog *searchDialog; }; #endif // LIBRARYDIALOG_H