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/mainwindows/application/application.pro | 4 ++++ examples/mainwindows/application/main.cpp | 4 ++++ examples/mainwindows/dockwidgets/dockwidgets.pro | 5 +++++ examples/mainwindows/mainwindows.pro | 6 +----- examples/mainwindows/mdi/main.cpp | 4 ++++ examples/mainwindows/mdi/mdi.pro | 4 ++++ examples/mainwindows/menus/main.cpp | 4 ++++ examples/mainwindows/menus/mainwindow.cpp | 6 ++++++ examples/mainwindows/menus/menus.pro | 3 +++ examples/mainwindows/recentfiles/main.cpp | 4 ++++ examples/mainwindows/recentfiles/recentfiles.pro | 3 +++ examples/mainwindows/sdi/main.cpp | 4 ++++ examples/mainwindows/sdi/sdi.pro | 4 ++++ 13 files changed, 50 insertions(+), 5 deletions(-) (limited to 'examples/mainwindows') diff --git a/examples/mainwindows/application/application.pro b/examples/mainwindows/application/application.pro index 10b2b84219..6b8f80afbb 100644 --- a/examples/mainwindows/application/application.pro +++ b/examples/mainwindows/application/application.pro @@ -12,3 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/application INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example might not fully work on Symbian platform) +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/mainwindows/application/main.cpp b/examples/mainwindows/application/main.cpp index 9a9dc9ca76..14c7af2bb3 100644 --- a/examples/mainwindows/application/main.cpp +++ b/examples/mainwindows/application/main.cpp @@ -51,7 +51,11 @@ int main(int argc, char *argv[]) app.setOrganizationName("Trolltech"); app.setApplicationName("Application Example"); MainWindow mainWin; +#if defined(Q_OS_SYMBIAN) + mainWin.showMaximized(); +#else mainWin.show(); +#endif return app.exec(); } //! [0] diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro index daba00c99c..a45b1e1dcd 100644 --- a/examples/mainwindows/dockwidgets/dockwidgets.pro +++ b/examples/mainwindows/dockwidgets/dockwidgets.pro @@ -10,3 +10,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/dockwidgets 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/mainwindows/mainwindows.pro b/examples/mainwindows/mainwindows.pro index 6471c1406a..7301c96a79 100644 --- a/examples/mainwindows/mainwindows.pro +++ b/examples/mainwindows/mainwindows.pro @@ -1,15 +1,10 @@ TEMPLATE = subdirs SUBDIRS = application \ - dockwidgets \ mdi \ menus \ recentfiles \ sdi -symbian: SUBDIRS = \ - menus - - # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mainwindows.pro README @@ -17,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example diff --git a/examples/mainwindows/mdi/main.cpp b/examples/mainwindows/mdi/main.cpp index 1a10a19619..4e21e75159 100644 --- a/examples/mainwindows/mdi/main.cpp +++ b/examples/mainwindows/mdi/main.cpp @@ -48,6 +48,10 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); MainWindow mainWin; +#if defined(Q_OS_SYMBIAN) + mainWin.showMaximized(); +#else mainWin.show(); +#endif return app.exec(); } diff --git a/examples/mainwindows/mdi/mdi.pro b/examples/mainwindows/mdi/mdi.pro index 74c418b52f..d545e880bc 100644 --- a/examples/mainwindows/mdi/mdi.pro +++ b/examples/mainwindows/mdi/mdi.pro @@ -12,3 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mdi INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example might not fully work on Symbian platform) +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/mainwindows/menus/main.cpp b/examples/mainwindows/menus/main.cpp index 01c8adae53..dffe80348a 100644 --- a/examples/mainwindows/menus/main.cpp +++ b/examples/mainwindows/menus/main.cpp @@ -46,6 +46,10 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#else window.show(); +#endif return app.exec(); } diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp index cae81f6b71..99f1ddcfbf 100644 --- a/examples/mainwindows/menus/mainwindow.cpp +++ b/examples/mainwindows/menus/mainwindow.cpp @@ -53,8 +53,12 @@ MainWindow::MainWindow() QWidget *topFiller = new QWidget; topFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); +#ifdef Q_OS_SYMBIAN + infoLabel = new QLabel(tr("Choose a menu option")); +#else infoLabel = new QLabel(tr("Choose a menu option, or right-click to " "invoke a context menu")); +#endif infoLabel->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); infoLabel->setAlignment(Qt::AlignCenter); @@ -73,8 +77,10 @@ MainWindow::MainWindow() createActions(); createMenus(); +#ifndef Q_OS_SYMBIAN QString message = tr("A context menu is available by right-clicking"); statusBar()->showMessage(message); +#endif setWindowTitle(tr("Menus")); setMinimumSize(160, 160); diff --git a/examples/mainwindows/menus/menus.pro b/examples/mainwindows/menus/menus.pro index c437f160bb..4131d92f92 100644 --- a/examples/mainwindows/menus/menus.pro +++ b/examples/mainwindows/menus/menus.pro @@ -12,3 +12,6 @@ symbian { TARGET.UID3 = 0xA000CF66 CONFIG += qt_example } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/mainwindows/recentfiles/main.cpp b/examples/mainwindows/recentfiles/main.cpp index 3bbf0137c1..37891b3983 100644 --- a/examples/mainwindows/recentfiles/main.cpp +++ b/examples/mainwindows/recentfiles/main.cpp @@ -48,6 +48,10 @@ int main(int argc, char *argv[]) app.setOrganizationName("Trolltech"); app.setApplicationName("Recent Files Example"); MainWindow *mainWin = new MainWindow; +#if defined(Q_OS_SYMBIAN) + mainWin->showMaximized(); +#else mainWin->show(); +#endif return app.exec(); } diff --git a/examples/mainwindows/recentfiles/recentfiles.pro b/examples/mainwindows/recentfiles/recentfiles.pro index a8e83ffa20..c3057fd9c0 100644 --- a/examples/mainwindows/recentfiles/recentfiles.pro +++ b/examples/mainwindows/recentfiles/recentfiles.pro @@ -9,3 +9,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/recentfiles INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +simulator: warning(This example might not fully work on Simulator platform) diff --git a/examples/mainwindows/sdi/main.cpp b/examples/mainwindows/sdi/main.cpp index 0fb8a0388d..ae3586cffc 100644 --- a/examples/mainwindows/sdi/main.cpp +++ b/examples/mainwindows/sdi/main.cpp @@ -49,6 +49,10 @@ int main(int argc, char *argv[]) app.setApplicationName("SDI Example"); app.setOrganizationName("Trolltech"); MainWindow *mainWin = new MainWindow; +#if defined(Q_OS_SYMBIAN) + mainWin->showMaximized(); +#else mainWin->show(); +#endif return app.exec(); } diff --git a/examples/mainwindows/sdi/sdi.pro b/examples/mainwindows/sdi/sdi.pro index 70bbf6543c..5a75e2a6cd 100644 --- a/examples/mainwindows/sdi/sdi.pro +++ b/examples/mainwindows/sdi/sdi.pro @@ -10,3 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/sdi INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example might not fully work on Symbian platform) +simulator: warning(This example might not fully work on Simulator platform) -- 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/mainwindows/application/application.desktop | 11 +++++++++++ examples/mainwindows/dockwidgets/dockwidgets.desktop | 11 +++++++++++ examples/mainwindows/mdi/mdi.desktop | 11 +++++++++++ examples/mainwindows/menus/menus.desktop | 11 +++++++++++ examples/mainwindows/recentfiles/recentfiles.desktop | 11 +++++++++++ examples/mainwindows/sdi/sdi.desktop | 11 +++++++++++ 6 files changed, 66 insertions(+) create mode 100644 examples/mainwindows/application/application.desktop create mode 100644 examples/mainwindows/dockwidgets/dockwidgets.desktop create mode 100644 examples/mainwindows/mdi/mdi.desktop create mode 100644 examples/mainwindows/menus/menus.desktop create mode 100644 examples/mainwindows/recentfiles/recentfiles.desktop create mode 100644 examples/mainwindows/sdi/sdi.desktop (limited to 'examples/mainwindows') diff --git a/examples/mainwindows/application/application.desktop b/examples/mainwindows/application/application.desktop new file mode 100644 index 0000000000..b6fab1f1fe --- /dev/null +++ b/examples/mainwindows/application/application.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Application +Exec=/opt/usr/bin/application +Icon=application +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/mainwindows/dockwidgets/dockwidgets.desktop b/examples/mainwindows/dockwidgets/dockwidgets.desktop new file mode 100644 index 0000000000..1f57cb613b --- /dev/null +++ b/examples/mainwindows/dockwidgets/dockwidgets.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Dock Widgets +Exec=/opt/usr/bin/dockwidgets +Icon=dockwidgets +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/mainwindows/mdi/mdi.desktop b/examples/mainwindows/mdi/mdi.desktop new file mode 100644 index 0000000000..267e6f19d0 --- /dev/null +++ b/examples/mainwindows/mdi/mdi.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=MDI +Exec=/opt/usr/bin/mdi +Icon=mdi +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/mainwindows/menus/menus.desktop b/examples/mainwindows/menus/menus.desktop new file mode 100644 index 0000000000..dc2bda92af --- /dev/null +++ b/examples/mainwindows/menus/menus.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Menus +Exec=/opt/usr/bin/menus +Icon=menus +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/mainwindows/recentfiles/recentfiles.desktop b/examples/mainwindows/recentfiles/recentfiles.desktop new file mode 100644 index 0000000000..c314cf7f7c --- /dev/null +++ b/examples/mainwindows/recentfiles/recentfiles.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Recent Files +Exec=/opt/usr/bin/recentfiles +Icon=recentfiles +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/mainwindows/sdi/sdi.desktop b/examples/mainwindows/sdi/sdi.desktop new file mode 100644 index 0000000000..06d7289c8b --- /dev/null +++ b/examples/mainwindows/sdi/sdi.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=SDI +Exec=/opt/usr/bin/sdi +Icon=sdi +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable -- cgit v1.2.3