-void MainWindow::resizeEvent(QResizeEvent *e)
-{
- Trace t("MainWindow::resizeEvent");
-#ifdef Q_OS_SYMBIAN
- // Tool bar is only useful in portrait mode
- bool isPortrait =
- (QApplication::desktop()->width() < QApplication::desktop()->height());
- toolBar->setVisible(isPortrait);
-#endif
- QTimer::singleShot(100, this, SLOT(placeChildren()));
- AdopterWindow::resizeEvent(e);
-}
-
-void MainWindow::placeChildren()
-{
- Trace t("MainWindow::placeChildren");
-
- int toolBarHeight = 0;
-
-#ifdef Q_OS_SYMBIAN
- // Tool bar is only useful in portrait mode
- bool isPortrait =
- (QApplication::desktop()->width() < QApplication::desktop()->height());
- // toolBar->setVisible(isPortrait);
-
- // Work around Symbian bug: If there is no tool bar, increase decorator
- // widgets' Y coordinates
- if (!isPortrait) {
- toolBarHeight = toolBar->height();
- }
-#endif // Q_OS_SYMBIAN
-
- if (hasChild(view)) {
- QRect geo = centralWidget()->geometry();
- qDebug() << "centralWidget (MainWindow::resizeEvent)" << geo;
-#ifdef Q_OS_SYMBIAN
- // FIXME: When returning from full screen in landscape mode,
- // the central widget's height is miscalculated on Symbian.
- // My apologies for this kludge
- if (geo.height() == 288) {
- geo.setHeight(223);
- }
-#endif // Q_OS_SYMBIAN
- progress->setGeometry(geo.x(),
- geo.y() + geo.height() - progress->thickness() + toolBarHeight,
- geo.width(), progress->thickness());
- previousButton->setGeometry(geo.x(),
- geo.y() + geo.height() - TranslucentButton::pixels + toolBarHeight,
- 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 (MainWindow::resizeEvent)"
- << progress->geometry();
- }
-
-}
-