Navigate with volume keys.
[dorian] / mainwindow.h
index f2a5f6f..327b334 100755 (executable)
@@ -2,6 +2,7 @@
 #define MAINWINDOW_H
 
 #include <QtGui>
+#include "bookfinder.h"
 
 class QString;
 class QModelIndex;
@@ -9,6 +10,7 @@ class DevTools;
 class BookView;
 class Book;
 class FullScreenWindow;
+class Progress;
 
 class MainWindow: public QMainWindow
 {
@@ -16,7 +18,7 @@ class MainWindow: public QMainWindow
 
 public:
     MainWindow(QWidget *parent = 0);
-    virtual ~MainWindow() {}
+    ~MainWindow();
 
 public slots:
     void showLibrary();
@@ -25,23 +27,26 @@ public slots:
     void showDevTools();
     void showBookmarks();
     void onCurrentBookChanged();
-    void showNormal();
-    void showFullScreen();
+    void showRegular();
+    void showBig();
     void onSettingsChanged(const QString &key);
-    void onChapterLoadStart();
-    void onChapterLoadEnd(int index);
+    void onPartLoadStart();
+    void onPartLoadEnd(int index);
     void onAddBookmark();
     void onGoToBookmark(int index);
     void showChapters();
     void onGoToChapter(int index);
 
 protected:
-    virtual void closeEvent(QCloseEvent *event);
+    void closeEvent(QCloseEvent *event);
+    void timerEvent(QTimerEvent *event);
+    void resizeEvent(QResizeEvent *event);
 
 private:
     void setCurrentBook(const QModelIndex &current);
     QAction *addToolBarAction(const QObject *receiver, const char *member,
                               const QString &name);
+    void grabZoomKeys();
     BookView *view;
     QAction *settingsAction;
     QAction *libraryAction;
@@ -59,6 +64,10 @@ private:
     DevTools *devTools;
     QModelIndex mCurrent;
     FullScreenWindow *fullScreenWindow;
+    int preventBlankingTimer;
+    BookFinder *bookFinder;
+    BookFinderThread bookFinderThread;
+    Progress *progress;
 };
 
 #endif // MAINWINDOW_H