+void AdopterWindow::placeDecorations()
+{
+ Trace t("AdopterWindow::placeDecorations");
+
+ if (!hasBookView()) {
+ return;
+ }
+
+ int extraHeight = 0;
+
+ QRect geo = bookView->geometry();
+ qDebug() << "bookView:" << geo;
+
+#ifdef Q_OS_SYMBIAN
+ // Work around Symbian bug: If tool bar is hidden, increase bottom
+ // decorator widgets' Y coordinates by the tool bar's height
+ if (isToolBarHidden()) {
+ extraHeight = toolBarHeight();
+ }
+
+ // Work around another Symbian bug: When returning from full screen mode
+ // in landscape, the book view widget's height is miscalculated.
+ // My apologies for this kludge
+ if (geo.height() == 288) {
+ qDebug() << "Adjusting bottom Y";
+ extraHeight -= 288 - 223;
+ }
+#endif // Q_OS_SYMBIAN
+
+ progress->setGeometry(geo.x(),
+ geo.y() + geo.height() - progress->thickness() + extraHeight,
+ geo.width(), progress->thickness());
+ previousButton->setGeometry(geo.x(),
+ geo.y() + geo.height() - TranslucentButton::pixels + extraHeight,
+ TranslucentButton::pixels, TranslucentButton::pixels);
+ nextButton->setGeometry(geo.x() + geo.width() - TranslucentButton::pixels,
+ geo.y(), TranslucentButton::pixels, TranslucentButton::pixels);
+ progress->flash();
+ previousButton->flash();
+ nextButton->flash();
+ qDebug() << "progress:" << progress->geometry();
+}
+
+void AdopterWindow::onPageUp()
+{
+ if (bookView && grabbingVolumeKeys) {
+ setEnabled(false);
+ bookView->goPreviousPage();
+ setEnabled(true);
+ }
+}
+
+void AdopterWindow::onPageDown()
+{
+ if (bookView && grabbingVolumeKeys) {
+ setEnabled(false);
+ bookView->goNextPage();
+ setEnabled(true);
+ }
+}