X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;h=f383234898e4fc73c17af489109bc88ab0625c71;hb=72650dd361fdc879b8295ef11a1e0c1cbc0cbd91;hp=e0280d32a71d0fc70a000c609829bc8936c1c9f4;hpb=b8a04aa7d69a1bbfe262a6d0647c8d63cf96f423;p=jspeed diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e0280d3..f383234 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -27,6 +27,7 @@ #include "mainwindowstack.h" #include "theme.h" #include "detailwidget.h" +#include "detailscreen.h" #include "mainmenu.h" #include "odometer.h" @@ -51,7 +52,9 @@ void MainWindow::addScreens() connect(stack_, SIGNAL(settingsPressed()), this, SLOT(openMenu())); connect(stack_, SIGNAL(closePressed()), this, SIGNAL(quit())); - theme_ = new Theme; + DetailWidget* details = new DetailWidget(this); + + theme_ = new Theme(details->getScreen()); if(!loadTheme()) { @@ -59,7 +62,7 @@ void MainWindow::addScreens() } stack_->addScreen(theme_); - stack_->addScreen(new DetailWidget(this)); + stack_->addScreen(details); connect(QApplication::desktop(), SIGNAL(resized(int)), stack_, SLOT(reArrange())); @@ -83,6 +86,10 @@ bool MainWindow::loadTheme() { setAttribute(Qt::WA_Maemo5PortraitOrientation, true); } + else + { + setAttribute(Qt::WA_Maemo5LandscapeOrientation, true); + } return true; }