Undo bad fix on Symbian.
[dorian] / bookview.h
index e3d6597..74ef200 100644 (file)
@@ -27,13 +27,26 @@ class BookView: public QWebView
 
 public:
     explicit BookView(QWidget *parent = 0);
+
+    /** Set current book. */
     void setBook(Book *book);
+
+    /** Get current book. */
     Book *book();
+
+    /** Go to the position decribed by "bookmark". */
     void goToBookmark(const Book::Bookmark &bookmark);
+
+    /** Add bookmark to book at the current position. */
     void addBookmark(const QString &note);
-    void setLastBookmark();
-    void restoreLastBookmark();
+
+    /** Save current reading position into book. */
+    void setLastBookmark(bool fast = false);
+
+    /** Go to given part + part fragment URL. */
     void goToPart(int part, const QString &fragment);
+
+    /** Go to given fragment URL in current part. */
     void goToFragment(const QString &fragment);
 
     /** If grab is true, volume keys will generate act as page up/down. */
@@ -46,9 +59,6 @@ signals:
     /** Part loading finished. */
     void partLoadEnd(int index);
 
-    /** Signal button press, when the real event has been suppressed. */
-    void suppressedMouseButtonPress();
-
     /** Signal progress in reading the book. */
     void progress(qreal p);
 
@@ -77,6 +87,9 @@ public slots:
     /** Restore saved position after URL loading finished. */
     void restoreAfterLoad();
 
+    /** Restore book's last reading position. */
+    void restoreLastBookmark();
+
 protected slots:
 #ifdef Q_OS_SYMBIAN
     /** Observe media keys. */
@@ -89,10 +102,7 @@ protected:
     void wheelEvent(QWheelEvent *);
     bool eventFilter(QObject *o, QEvent *e);
     void timerEvent(QTimerEvent *e);
-#ifdef Q_WS_MAEMO_5
-    void leaveEvent(QEvent *e);
-    void enterEvent(QEvent *e);
-#endif // Q_WS_MAEMO_5
+    void hideEvent(QHideEvent *e);
 
     /** Load given part. */
     void loadContent(int index);
@@ -106,6 +116,7 @@ protected:
     /** Show reading progress. */
     void showProgress();
 
+private:
     int contentIndex;       /**< Current part in book. */
     Book *mBook;            /**< Book to show. */
     bool restorePositionAfterLoad;
@@ -123,10 +134,13 @@ protected:
 #if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
     int scrollerMonitor;    /**< ID of timer monitoring kinetic scroll. */
 #endif
+
 #if defined(Q_WS_MAEMO_5)
     QAbstractKineticScroller *scroller;
-#elif defined(Q_OS_SYMBIAN)
-    FlickCharm *charm;
+#endif
+
+#if defined(Q_OS_SYMBIAN)
+    FlickCharm *charm;      /**< Kinetic scroller. */
 #endif
 };