Navigate with volume keys.
[dorian] / bookview.h
index ee7cfc2..54c13ad 100644 (file)
@@ -10,6 +10,8 @@
 #include "book.h"
 
 class QModelIndex;
+class Progress;
+class QAbstractKineticScroller;
 
 /** Visual representation of a book. */
 class BookView: public QWebView
@@ -33,6 +35,9 @@ signals:
     /** Signal button press when the real event has been suppressed. */
     void suppressedMouseButtonPress();
 
+    /** Signal progress in reading the book. */
+    void progress(qreal p);
+
 public slots:
     void goPrevious();
     void goNext();
@@ -46,11 +51,14 @@ public slots:
     void onContentsSizeChanged(const QSize &size);
 
 protected:
-    virtual void paintEvent(QPaintEvent *e);
-    virtual void mousePressEvent(QMouseEvent *e);
+    void paintEvent(QPaintEvent *e);
+    void mousePressEvent(QMouseEvent *e);
+    void wheelEvent(QWheelEvent *);
     bool eventFilter(QObject *o, QEvent *e);
-    virtual void leaveEvent(QEvent *);
-    virtual void enterEvent(QEvent *);
+    void leaveEvent(QEvent *e);
+    void enterEvent(QEvent *e);
+    void timerEvent(QTimerEvent *e);
+    void keyPressEvent(QKeyEvent *e);
 
 private:
     /** Save navigation icons from resource to the file system. */
@@ -71,6 +79,15 @@ private:
     /** Go to a given (relative) position in current part. */
     void goToPosition(qreal position);
 
+    /** Show progress. */
+    void showProgress();
+
+    /** Go to previous page. */
+    void goPreviousPage();
+
+    /** Go to next page. */
+    void goNextPage();
+
     int contentIndex;   /**< Current part in book. */
     Book *mBook;        /**< Book to show. */
     bool restorePositionAfterLoad;
@@ -83,6 +100,11 @@ private:
     bool mousePressed;
     int contentsHeight; /**< Last know height of the frame. */
     bool decorated;     /**< True after adding the arrows to the frame contents. */
+
+    int scrollerMonitor;
+#ifdef Q_WS_MAEMO_5
+    QAbstractKineticScroller *scroller;
+#endif
 };
 
 #endif // BOOKVIEW_H