#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);
private:
QString createItemText(const Book *book);
+ void setSelected(const QModelIndex &index);
+ QModelIndex selected() const;
+ QListView *list;
+ SortedLibrary *sortedLibrary;
};
#endif // LIBRARYDIALOG_H