diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-27 19:16:41 +0200 |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-05-23 14:24:07 +0200 |
commit | 0748751c9f097d9d866605306bbdd4b96e2a5c4e (patch) | |
tree | 1838365e6ad6592a26e193289d2136cb89319972 /examples/layouts | |
parent | 5feefb0c039dae04290d1fca7c2f24276b6f7582 (diff) |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/layouts')
-rw-r--r-- | examples/layouts/basiclayouts/basiclayouts.pro | 5 | ||||
-rw-r--r-- | examples/layouts/basiclayouts/main.cpp | 8 | ||||
-rw-r--r-- | examples/layouts/borderlayout/borderlayout.pro | 1 | ||||
-rw-r--r-- | examples/layouts/borderlayout/main.cpp | 4 | ||||
-rw-r--r-- | examples/layouts/dynamiclayouts/dialog.cpp | 4 | ||||
-rw-r--r-- | examples/layouts/dynamiclayouts/dialog.h | 5 | ||||
-rw-r--r-- | examples/layouts/dynamiclayouts/dynamiclayouts.pro | 5 | ||||
-rw-r--r-- | examples/layouts/dynamiclayouts/main.cpp | 7 | ||||
-rw-r--r-- | examples/layouts/flowlayout/flowlayout.pro | 1 | ||||
-rw-r--r-- | examples/layouts/flowlayout/main.cpp | 4 | ||||
-rw-r--r-- | examples/layouts/flowlayout/window.cpp | 2 | ||||
-rw-r--r-- | examples/layouts/layouts.pro | 1 |
12 files changed, 44 insertions, 3 deletions
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 <QMainWindow> #include <QDialog> #include <QQueue> @@ -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 |