Fix sorting of library. Add basic search framework.
[dorian] / mainwindow.h
index 54702f6..416865f 100755 (executable)
@@ -3,8 +3,7 @@
 
 #include <QtGui>
 
-#include "bookwindow.h"
-#include "bookfinder.h"
+#include "adopterwindow.h"
 
 class QString;
 class QModelIndex;
@@ -13,8 +12,9 @@ class BookView;
 class Book;
 class FullScreenWindow;
 class Progress;
+class TranslucentButton;
 
-class MainWindow: public BookWindow
+class MainWindow: public AdopterWindow
 {
     Q_OBJECT
 
@@ -38,6 +38,15 @@ public slots:
     void onGoToBookmark(int index);
     void showChapters();
     void onGoToChapter(int index);
+    void about();
+    void goToNextPage();
+    void goToPreviousPage();
+    void onBeginUpgrade(int total);
+    void onUpgrading(const QString &book);
+    void onEndUpgrade();
+    void onBeginLoad(int total);
+    void onLoading(const QString &book);
+    void onEndLoad();
 
 protected:
     void closeEvent(QCloseEvent *event);
@@ -46,8 +55,6 @@ protected:
 
 private:
     void setCurrentBook(const QModelIndex &current);
-    QAction *addToolBarAction(const QObject *receiver, const char *member,
-                              const QString &name);
     BookView *view;
     QAction *settingsAction;
     QAction *libraryAction;
@@ -57,18 +64,16 @@ private:
     QAction *fullScreenAction;
     QAction *forwardAction;
     QAction *backwardAction;
-    QAction *previousAction;
-    QAction *nextAction;
     QAction *chaptersAction;
-    QToolBar *toolBar;
     QDialog *settings;
     DevTools *devTools;
     QModelIndex mCurrent;
     FullScreenWindow *fullScreenWindow;
     int preventBlankingTimer;
-    BookFinder *bookFinder;
-    BookFinderThread bookFinderThread;
     Progress *progress;
+    TranslucentButton *previousButton;
+    TranslucentButton *nextButton;
+    QProgressDialog *libraryProgress;
 };
 
 #endif // MAINWINDOW_H