mainwindow->showMaximized();
#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
-mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+ Orientation o = AppSettings::getOrientation();
+ switch (o) {
+ case AUTO_ROTATE:
+ mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+ break;
+ case LANDSCAPE:
+ mainwindow->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+ break;
+ case PORTRAIT:
+ mainwindow->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+ break;
+ default:
+ mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+ break;
+ }
#endif
return a.exec();
}