X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=librarydialog.h;h=a29a0930203fe4f279d58c1bde0adae54a339c66;hb=5b90676a3adb2b9df8504684093c165f684eac29;hp=1424eadb7637e2a56f3edcf7a7ba7681a30263cc;hpb=da633770e23522eea81e37712724da34ff4139b4;p=dorian diff --git a/librarydialog.h b/librarydialog.h index 1424ead..a29a093 100644 --- a/librarydialog.h +++ b/librarydialog.h @@ -5,15 +5,20 @@ #include #include -class QMainWindow; -class QListView; +#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 @@ -22,28 +27,24 @@ public: public slots: void onAdd(); -#ifndef Q_WS_MAEMO_5 - void onRemove(); - void onDetails(); - void onRead(); - void onItemSelectionChanged(); -#endif // Q_WS_MAEMO_5 + void onAddFolder(); void onBookAdded(); void onItemActivated(const QModelIndex &index); - void onCurrentBookChanged(); + 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); - QModelIndex selected() const; - QListView *list; SortedLibrary *sortedLibrary; -#ifndef Q_WS_MAEMO_5 - QPushButton *detailsButton; - QPushButton *removeButton; - QPushButton *readButton; -#endif // Q_WS_MAEMO_5 - QPushButton *addButton; + ProgressDialog *progress; + QAction *sortByAuthor; + QAction *sortByTitle; + SearchDialog *searchDialog; }; #endif // LIBRARYDIALOG_H