diff options
Diffstat (limited to 'examples/effects/lighting')
-rw-r--r-- | examples/effects/lighting/lighting.cpp | 6 | ||||
-rw-r--r-- | examples/effects/lighting/lighting.desktop | 11 | ||||
-rw-r--r-- | examples/effects/lighting/lighting.h | 3 | ||||
-rw-r--r-- | examples/effects/lighting/lighting.pro | 4 | ||||
-rw-r--r-- | examples/effects/lighting/main.cpp | 5 |
5 files changed, 29 insertions, 0 deletions
diff --git a/examples/effects/lighting/lighting.cpp b/examples/effects/lighting/lighting.cpp index a988ffb..bd23a2d 100644 --- a/examples/effects/lighting/lighting.cpp +++ b/examples/effects/lighting/lighting.cpp @@ -134,3 +134,9 @@ void Lighting::animate() m_scene.update(); } +void Lighting::resizeEvent(QResizeEvent */*event*/) +{ +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + fitInView(sceneRect(), Qt::KeepAspectRatio); +#endif +} diff --git a/examples/effects/lighting/lighting.desktop b/examples/effects/lighting/lighting.desktop new file mode 100644 index 0000000..806b3de --- /dev/null +++ b/examples/effects/lighting/lighting.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Lighting Effect +Exec=/opt/usr/bin/lighting +Icon=lighting +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/effects/lighting/lighting.h b/examples/effects/lighting/lighting.h index 6a6bc56..5099653 100644 --- a/examples/effects/lighting/lighting.h +++ b/examples/effects/lighting/lighting.h @@ -57,6 +57,9 @@ private slots: private: void setupScene(); +protected: + void resizeEvent(QResizeEvent *event); + private: qreal angle; QGraphicsScene m_scene; diff --git a/examples/effects/lighting/lighting.pro b/examples/effects/lighting/lighting.pro index 432d1b5..b816673 100644 --- a/examples/effects/lighting/lighting.pro +++ b/examples/effects/lighting/lighting.pro @@ -6,3 +6,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/effects/lighting sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS lighting.pro sources.path = $$[QT_INSTALL_EXAMPLES]/effects/lighting INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/effects/lighting/main.cpp b/examples/effects/lighting/main.cpp index c75d841..fff3d73 100644 --- a/examples/effects/lighting/main.cpp +++ b/examples/effects/lighting/main.cpp @@ -47,8 +47,13 @@ int main(int argc, char **argv) Lighting lighting; lighting.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Lighting and Shadows")); + +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + lighting.showMaximized(); +#else lighting.resize(640, 480); lighting.show(); +#endif return app.exec(); } |