From 0748751c9f097d9d866605306bbdd4b96e2a5c4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 27 Apr 2011 19:16:41 +0200 Subject: Squashed commit of the changes from the mobile-examples repository (4.7-generated-declarative branch). --- examples/layouts/basiclayouts/basiclayouts.pro | 5 +++++ examples/layouts/basiclayouts/main.cpp | 8 +++++++- examples/layouts/borderlayout/borderlayout.pro | 1 + examples/layouts/borderlayout/main.cpp | 4 ++++ examples/layouts/dynamiclayouts/dialog.cpp | 4 ++++ examples/layouts/dynamiclayouts/dialog.h | 5 +++++ examples/layouts/dynamiclayouts/dynamiclayouts.pro | 5 +++++ examples/layouts/dynamiclayouts/main.cpp | 7 ++++++- examples/layouts/flowlayout/flowlayout.pro | 1 + examples/layouts/flowlayout/main.cpp | 4 ++++ examples/layouts/flowlayout/window.cpp | 2 +- examples/layouts/layouts.pro | 1 + 12 files changed, 44 insertions(+), 3 deletions(-) (limited to 'examples/layouts') diff --git a/examples/layouts/basiclayouts/basiclayouts.pro b/examples/layouts/basiclayouts/basiclayouts.pro index cd0552f9ff..2b15787446 100644 --- a/examples/layouts/basiclayouts/basiclayouts.pro +++ b/examples/layouts/basiclayouts/basiclayouts.pro @@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/basiclayouts INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example might not fully work on Symbian platform) +maemo5: warning(This example might not fully work on Maemo platform) +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/layouts/basiclayouts/main.cpp b/examples/layouts/basiclayouts/main.cpp index 8aa11f488d..6b6077546f 100644 --- a/examples/layouts/basiclayouts/main.cpp +++ b/examples/layouts/basiclayouts/main.cpp @@ -46,5 +46,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Dialog dialog; - return dialog.exec(); +#if defined(Q_OS_SYMBIAN) + dialog.showMaximized(); +#else + dialog.show(); +#endif + + return app.exec(); } diff --git a/examples/layouts/borderlayout/borderlayout.pro b/examples/layouts/borderlayout/borderlayout.pro index 6ddbb94f92..19075ab412 100644 --- a/examples/layouts/borderlayout/borderlayout.pro +++ b/examples/layouts/borderlayout/borderlayout.pro @@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/borderlayout INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example diff --git a/examples/layouts/borderlayout/main.cpp b/examples/layouts/borderlayout/main.cpp index f2079f511b..4a43828d45 100644 --- a/examples/layouts/borderlayout/main.cpp +++ b/examples/layouts/borderlayout/main.cpp @@ -46,6 +46,10 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Window window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/layouts/dynamiclayouts/dialog.cpp b/examples/layouts/dynamiclayouts/dialog.cpp index 58711bee7f..690e52b8fa 100644 --- a/examples/layouts/dynamiclayouts/dialog.cpp +++ b/examples/layouts/dynamiclayouts/dialog.cpp @@ -43,7 +43,11 @@ #include "dialog.h" Dialog::Dialog(QWidget *parent) +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + : QWidget(parent) +#else : QDialog(parent) +#endif { createRotableGroupBox(); createOptionsGroupBox(); diff --git a/examples/layouts/dynamiclayouts/dialog.h b/examples/layouts/dynamiclayouts/dialog.h index 9409be1b57..3ada992858 100644 --- a/examples/layouts/dynamiclayouts/dialog.h +++ b/examples/layouts/dynamiclayouts/dialog.h @@ -41,6 +41,7 @@ #ifndef DIALOG_H #define DIALOG_H +#include #include #include @@ -53,7 +54,11 @@ class QLabel; class QPushButton; QT_END_NAMESPACE +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) +class Dialog : public QWidget +#else class Dialog : public QDialog +#endif { Q_OBJECT diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.pro b/examples/layouts/dynamiclayouts/dynamiclayouts.pro index e0fbecceca..44f2b5fdcd 100644 --- a/examples/layouts/dynamiclayouts/dynamiclayouts.pro +++ b/examples/layouts/dynamiclayouts/dynamiclayouts.pro @@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/dynamiclayouts INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example might not fully work on Symbian platform) +maemo5: warning(This example might not fully work on Maemo platform) +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/layouts/dynamiclayouts/main.cpp b/examples/layouts/dynamiclayouts/main.cpp index 8aa11f488d..c30db12bb5 100644 --- a/examples/layouts/dynamiclayouts/main.cpp +++ b/examples/layouts/dynamiclayouts/main.cpp @@ -46,5 +46,10 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Dialog dialog; - return dialog.exec(); +#if defined(Q_OS_SYMBIAN) + dialog.showMaximized(); +#else + dialog.show(); +#endif + return app.exec(); } diff --git a/examples/layouts/flowlayout/flowlayout.pro b/examples/layouts/flowlayout/flowlayout.pro index 6d1a160cf6..6064b5a57c 100644 --- a/examples/layouts/flowlayout/flowlayout.pro +++ b/examples/layouts/flowlayout/flowlayout.pro @@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/flowlayout INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example diff --git a/examples/layouts/flowlayout/main.cpp b/examples/layouts/flowlayout/main.cpp index f2079f511b..4a43828d45 100644 --- a/examples/layouts/flowlayout/main.cpp +++ b/examples/layouts/flowlayout/main.cpp @@ -46,6 +46,10 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Window window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/layouts/flowlayout/window.cpp b/examples/layouts/flowlayout/window.cpp index 51f09a8b83..0c7eb73101 100644 --- a/examples/layouts/flowlayout/window.cpp +++ b/examples/layouts/flowlayout/window.cpp @@ -56,4 +56,4 @@ Window::Window() setWindowTitle(tr("Flow Layout")); } -//! [1] \ No newline at end of file +//! [1] diff --git a/examples/layouts/layouts.pro b/examples/layouts/layouts.pro index 65bf7f235a..678691ad86 100644 --- a/examples/layouts/layouts.pro +++ b/examples/layouts/layouts.pro @@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts INSTALLS += sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example -- cgit v1.2.3 From 0cbcc61ef35b9bce1d65d048853c79004b755b87 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 11 May 2011 17:35:46 +0200 Subject: Squashed commit of changes from the 4.8-temp branch. --- examples/layouts/basiclayouts/basiclayouts.desktop | 11 +++++++++++ examples/layouts/borderlayout/borderlayout.desktop | 11 +++++++++++ examples/layouts/dynamiclayouts/dynamiclayouts.desktop | 11 +++++++++++ examples/layouts/flowlayout/flowlayout.desktop | 11 +++++++++++ 4 files changed, 44 insertions(+) create mode 100644 examples/layouts/basiclayouts/basiclayouts.desktop create mode 100644 examples/layouts/borderlayout/borderlayout.desktop create mode 100644 examples/layouts/dynamiclayouts/dynamiclayouts.desktop create mode 100644 examples/layouts/flowlayout/flowlayout.desktop (limited to 'examples/layouts') diff --git a/examples/layouts/basiclayouts/basiclayouts.desktop b/examples/layouts/basiclayouts/basiclayouts.desktop new file mode 100644 index 0000000000..6c612eed09 --- /dev/null +++ b/examples/layouts/basiclayouts/basiclayouts.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Basic Layouts +Exec=/opt/usr/bin/basiclayouts +Icon=basiclayouts +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/layouts/borderlayout/borderlayout.desktop b/examples/layouts/borderlayout/borderlayout.desktop new file mode 100644 index 0000000000..3fd0641f1c --- /dev/null +++ b/examples/layouts/borderlayout/borderlayout.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Border Layout +Exec=/opt/usr/bin/borderlayout +Icon=borderlayout +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.desktop b/examples/layouts/dynamiclayouts/dynamiclayouts.desktop new file mode 100644 index 0000000000..482286bfb8 --- /dev/null +++ b/examples/layouts/dynamiclayouts/dynamiclayouts.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Dynamic Layouts +Exec=/opt/usr/bin/dynamiclayouts +Icon=dynamiclayouts +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/layouts/flowlayout/flowlayout.desktop b/examples/layouts/flowlayout/flowlayout.desktop new file mode 100644 index 0000000000..54ea3b0290 --- /dev/null +++ b/examples/layouts/flowlayout/flowlayout.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Flow Layout +Exec=/opt/usr/bin/flowlayout +Icon=flowlayout +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable -- cgit v1.2.3