Bookmarks with notes, first attempt.
[dorian] / bookview.h
index 54c13ad..5c0e1cd 100644 (file)
@@ -6,6 +6,7 @@
 #include <QStringList>
 #include <QHash>
 #include <QImage>
+#include <QPoint>
 
 #include "book.h"
 
@@ -24,7 +25,7 @@ public:
     void setBook(Book *book);
     Book *book();
     void goToBookmark(const Book::Bookmark &bookmark);
-    void addBookmark();
+    void addBookmark(const QString &note);
     void setLastBookmark();
     void restoreLastBookmark();
 
@@ -39,8 +40,12 @@ signals:
     void progress(qreal p);
 
 public slots:
+    /** Go to next part. */
     void goPrevious();
+
+    /** Go to previous part. */
     void goNext();
+
     void onLoadFinished(bool ok);
     void onSettingsChanged(const QString &key);
 
@@ -50,6 +55,12 @@ public slots:
     /** Handle main frame contents size changes. */
     void onContentsSizeChanged(const QSize &size);
 
+    /** Go to previous page. */
+    void goPreviousPage();
+
+    /** Go to next page. */
+    void goNextPage();
+
 protected:
     void paintEvent(QPaintEvent *e);
     void mousePressEvent(QMouseEvent *e);
@@ -61,18 +72,9 @@ protected:
     void keyPressEvent(QKeyEvent *e);
 
 private:
-    /** Save navigation icons from resource to the file system. */
-    void extractIcons();
-
-    /** Remove extracted icons. */
-    void removeIcons();
-
     /** Load given part. */
     void loadContent(int index);
 
-    /** Decorate web page frame with navigation icons. */
-    void addNavigationBar();
-
     /** Get temporary directory for extracting book contents. */
     QString tmpPath();
 
@@ -82,12 +84,6 @@ private:
     /** 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;
@@ -99,10 +95,9 @@ private:
     bool loaded;        /**< True if content has been loaded. */
     bool mousePressed;
     int contentsHeight; /**< Last know height of the frame. */
-    bool decorated;     /**< True after adding the arrows to the frame contents. */
 
+#if defined(Q_WS_MAEMO_5)
     int scrollerMonitor;
-#ifdef Q_WS_MAEMO_5
     QAbstractKineticScroller *scroller;
 #endif
 };