QVBoxLayout *layout = new QVBoxLayout(frame);
layout->setMargin(0);
frame->setLayout(layout);
- frame->show();
+ //frame->show();
setCentralWidget(frame);
#ifdef Q_OS_SYMBIAN
bookView = view;
bookView->setParent(this);
- bookView->show();
centralWidget()->layout()->addWidget(bookView);
+ bookView->show();
progress = prog;
previousButton = previous;
{
TRACE;
if (bookView) {
+ bookView->hide();
centralWidget()->layout()->removeWidget(bookView);
}
bookView = 0;
void AdopterWindow::show()
{
+ Trace t("AdopterWindow::show");
#ifdef Q_OS_SYMBIAN
foreach (QWidget *w, QApplication::allWidgets()) {
w->setContextMenuPolicy(Qt::NoContextMenu);
}
showMaximized();
- raise();
#else
QMainWindow::show();
#endif
{
Trace t("AdopterWindow::showEvent");
+ QMainWindow::showEvent(e);
#if defined(Q_WS_MAEMO_5)
doGrabVolumeKeys(grabbingVolumeKeys);
#endif // Q_WS_MAEMO_5
- QMainWindow::showEvent(e);
+ placeDecorations();
}
void AdopterWindow::resizeEvent(QResizeEvent *event)
{
Trace t("AdopterWindow::resizeEvent");
-
-#ifdef Q_OS_SYMBIAN
- if (toolBar) {
- if (portrait()) {
- qDebug() << "Show tool bar";
- toolBar->setVisible(true);
- } else {
- qDebug() << "Hide tool bar";
- toolBar->setVisible(false);
- }
- }
-#endif // Q_OS_SYMBIAN
-
- if (hasBookView()) {
- QTimer::singleShot(100, this, SLOT(placeDecorations()));
- }
QMainWindow::resizeEvent(event);
+ placeDecorations();
}
void AdopterWindow::keyPressEvent(QKeyEvent *event)
{
Trace t("AdopterWindow::placeDecorations");
+#ifdef Q_OS_SYMBIAN
+ if (toolBar) {
+ if (portrait()) {
+ qDebug() << "Show tool bar";
+ toolBar->setVisible(true);
+ } else {
+ qDebug() << "Hide tool bar";
+ toolBar->setVisible(false);
+ }
+ }
+#endif // Q_OS_SYMBIAN
+
if (!hasBookView()) {
return;
}