Navigate with volume keys.
[dorian] / librarydialog.h
index 95d8579..ed8c66b 100644 (file)
@@ -5,36 +5,30 @@
 #include <QString>
 #include <QModelIndexList>
 
-class QMainWindow;
+#include "listwindow.h"
+
 class QListView;
 class QPushButton;
 class QModelIndex;
+class QCloseEvent;
 class Book;
 class InfoWindow;
 class SortedLibrary;
 
-class LibraryDialog: public QDialog
+class LibraryDialog: public ListWindow
 {
     Q_OBJECT
 
 public:
     explicit LibraryDialog(QWidget *parent = 0);
-    QListView *list;
-    SortedLibrary *sortedLibrary;
-#ifndef Q_WS_MAEMO_5
-    QPushButton *detailsButton;
-    QPushButton *removeButton;
-    QPushButton *readButton;
-#endif // Q_WS_MAEMO_5
-    QPushButton *addButton;
 
 public slots:
     void onAdd();
+    void onShowFolders();
 #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);
@@ -42,6 +36,10 @@ public slots:
 
 private:
     QString createItemText(const Book *book);
+    void setSelected(const QModelIndex &index);
+    QModelIndex selected() const;
+    QListView *list;
+    SortedLibrary *sortedLibrary;
 };
 
 #endif // LIBRARYDIALOG_H