X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=fullscreenwindow.cpp;h=c63f003a0edd04b6e050926ed594795dcb694f4a;hb=4f302c4427507fec544f32b9003035e93f32b2e2;hp=07bf2910bca80d707f6fbefd19a2a44f6bcdd502;hpb=5648f4dcb3f32f229b54f94fb4b243ffb2080959;p=dorian diff --git a/fullscreenwindow.cpp b/fullscreenwindow.cpp index 07bf291..c63f003 100644 --- a/fullscreenwindow.cpp +++ b/fullscreenwindow.cpp @@ -9,8 +9,7 @@ static const int MARGIN = 9; -FullScreenWindow::FullScreenWindow(QWidget *parent): - AdopterWindow(parent), progress(0), previousButton(0), nextButton(0) +FullScreenWindow::FullScreenWindow(QWidget *parent): AdopterWindow(parent) { TRACE; Q_ASSERT(parent); @@ -18,9 +17,7 @@ FullScreenWindow::FullScreenWindow(QWidget *parent): setAttribute(Qt::WA_Maemo5StackedWindow, true); setAttribute(Qt::WA_Maemo5NonComposited, true); #endif // Q_WS_MAEMO_5 -#ifndef Q_OS_SYMBIAN - toolBar->hide(); -#endif + hideToolBar(); QFrame *frame = new QFrame(this); QVBoxLayout *layout = new QVBoxLayout(frame); layout->setMargin(0); @@ -36,32 +33,18 @@ FullScreenWindow::FullScreenWindow(QWidget *parent): connect(restoreButton, SIGNAL(triggered()), this, SIGNAL(restore())); } -void FullScreenWindow::showFullScreen() +void FullScreenWindow::showEvent(QShowEvent *e) { - Trace t("FullScreenWindow::showFullScreen"); - AdopterWindow::showFullScreen(); + Trace t("FullScreenWindow::showEvent"); + AdopterWindow::showEvent(e); placeChildren(); } void FullScreenWindow::resizeEvent(QResizeEvent *e) { Trace t("FullScreenWindow::resizeEvent"); - QTimer::singleShot(100, this, SLOT(placeChildren())); AdopterWindow::resizeEvent(e); -} - -void FullScreenWindow::takeChildren(BookView *view, - Progress *prog, - TranslucentButton *previous, - TranslucentButton *next) -{ - TRACE; - progress = prog; - previousButton = previous; - nextButton = next; - QList otherChildren; - otherChildren << progress << previousButton << nextButton; - AdopterWindow::takeChildren(view, otherChildren); + placeChildren(); } void FullScreenWindow::placeChildren() @@ -89,28 +72,5 @@ void FullScreenWindow::placeChildren() h - TranslucentButton::pixels - MARGIN, TranslucentButton::pixels, TranslucentButton::pixels); - - if (hasChild(progress)) { - progress->setGeometry(0, h - progress->thickness(), - w, progress->thickness()); - qDebug() << "Screen (FullScreenWindow::resizeEvent)" << w << "x" << h; - qDebug() << "Progress (FullScreenWindow::resizeEvent)" - << progress->geometry(); - } - if (hasChild(previousButton)) { - previousButton->setGeometry( - MARGIN, - h - TranslucentButton::pixels - MARGIN, - TranslucentButton::pixels, - TranslucentButton::pixels); - } - if (hasChild(nextButton)) { - nextButton->setGeometry( - w - TranslucentButton::pixels - MARGIN, - MARGIN, - TranslucentButton::pixels, - TranslucentButton::pixels); - } - restoreButton->flash(3000); }