QWebView::timerEvent(e);
}
+void BookView::hideEvent(QHideEvent *e)
+{
+ Trace t("BookView::hideEvent");
+
+#if defined(Q_OS_SYMBIAN)
+ setLastBookmark();
+#endif
+
+ QWebView::hideEvent(e);
+}
+
void BookView::goPreviousPage()
{
QWebFrame *frame = page()->mainFrame();
void wheelEvent(QWheelEvent *);
bool eventFilter(QObject *o, QEvent *e);
void timerEvent(QTimerEvent *e);
+ void hideEvent(QHideEvent *e);
/** Load given part. */
void loadContent(int index);
"chapters", tr("Chapters"), true);
bookmarksAction = addToolBarAction(this, SLOT(showBookmarks()),
"bookmarks", tr("Bookmarks"), true);
- infoAction = addToolBarAction(this, SLOT(showInfo()),
- "info", tr("Book info"), true);
libraryAction = addToolBarAction(this, SLOT(showLibrary()),
"library", tr("Library"), false);
+ rotateAction = addToolBarAction(this, SLOT(rotate()),
+ "rotate", tr("Rotate"), true);
#ifdef Q_WS_MAEMO_5
settingsAction = menuBar()->addAction(tr("Settings"));
(new SettingsWindow(this))->show();
}
-void MainWindow::showInfo()
+void MainWindow::rotate()
{
- if (mCurrent.isValid()) {
- (new InfoDialog(Library::instance()->book(mCurrent), this, false))->
- exec();
- }
+ QString current = Settings::instance()->value("orientation",
+ Platform::instance()->defaultOrientation()).toString();
+ QString target = (current == "landscape")? "portrait": "landscape";
+ Settings::instance()->setValue("orientation", target);
}
void MainWindow::showDevTools()
* Allow editing bookmark notes
* Make orientation switch explicit on Symbian, too
* Show button for full screen mode on Symbian, too
+ * Add tool bar button to change orientation
-- Akos Polster <akos@pipacs.com> Sun, 5 Dec 2010 02:00:00 +0100