equal
deleted
inserted
replaced
|
1 #include <QtGui/QApplication> |
|
2 #include "mainwindow.h" |
|
3 |
|
4 // Needed Symbian specific headers |
|
5 #ifdef Q_OS_SYMBIAN |
|
6 #include <eikenv.h> |
|
7 #include <eikappui.h> |
|
8 #include <aknenv.h> |
|
9 #include <aknappui.h> |
|
10 #include <coeaui.h> |
|
11 #endif |
|
12 |
|
13 int main(int argc, char *argv[]) |
|
14 { |
|
15 QApplication a(argc, argv); |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 MainWindow w; |
|
21 a.installEventFilter(&w); |
|
22 w.setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); |
|
23 |
|
24 // Symbian specific code |
|
25 #ifdef Q_OS_SYMBIAN |
|
26 CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); |
|
27 if(appUi){ |
|
28 TRAP_IGNORE( appUi->SetOrientationL( CAknAppUi::EAppUiOrientationPortrait ) ); |
|
29 } |
|
30 #endif |
|
31 |
|
32 #if defined(Q_WS_S60) |
|
33 w.showMaximized(); |
|
34 #else |
|
35 w.show(); |
|
36 #endif |
|
37 |
|
38 return a.exec(); |
|
39 } |