15 class QAbstractKineticScroller;
17 /** Visual representation of a book. */
18 class BookView: public QWebView
23 explicit BookView(QWidget *parent = 0);
25 void setBook(Book *book);
27 void goToBookmark(const Book::Bookmark &bookmark);
29 void setLastBookmark();
30 void restoreLastBookmark();
33 void partLoadStart(int index);
34 void partLoadEnd(int index);
36 /** Signal button press when the real event has been suppressed. */
37 void suppressedMouseButtonPress();
39 /** Signal progress in reading the book. */
40 void progress(qreal p);
43 /** Go to next part. */
46 /** Go to previous part. */
49 void onLoadFinished(bool ok);
50 void onSettingsChanged(const QString &key);
52 /** Add QObjects to the main frame. */
53 void addJavaScriptObjects();
55 /** Handle main frame contents size changes. */
56 void onContentsSizeChanged(const QSize &size);
58 /** Go to previous page. */
59 void goPreviousPage();
61 /** Go to next page. */
65 void paintEvent(QPaintEvent *e);
66 void mousePressEvent(QMouseEvent *e);
67 void wheelEvent(QWheelEvent *);
68 bool eventFilter(QObject *o, QEvent *e);
69 void leaveEvent(QEvent *e);
70 void enterEvent(QEvent *e);
71 void timerEvent(QTimerEvent *e);
72 void keyPressEvent(QKeyEvent *e);
75 /** Load given part. */
76 void loadContent(int index);
78 /** Get temporary directory for extracting book contents. */
81 /** Go to a given (relative) position in current part. */
82 void goToPosition(qreal position);
87 int contentIndex; /**< Current part in book. */
88 Book *mBook; /**< Book to show. */
89 bool restorePositionAfterLoad;
90 /**< If true, restoring position after load is needed. */
91 qreal positionAfterLoad;
92 /**< Position to be restored after load. */
94 /**< Bookmark icon pre-loaded. */
95 bool loaded; /**< True if content has been loaded. */
97 int contentsHeight; /**< Last know height of the frame. */
99 #if defined(Q_WS_MAEMO_5)
101 QAbstractKineticScroller *scroller;