diff options
Diffstat (limited to 'examples/mainwindows')
19 files changed, 116 insertions, 5 deletions
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/application/application.pro b/examples/mainwindows/application/application.pro index f98d3afd3c..f66fa5fb62 100644 --- a/examples/mainwindows/application/application.pro +++ b/examples/mainwindows/application/application.pro @@ -13,3 +13,7 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets +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.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/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro index 48aad1a620..6a155f6edd 100644 --- a/examples/mainwindows/dockwidgets/dockwidgets.pro +++ b/examples/mainwindows/dockwidgets/dockwidgets.pro @@ -11,3 +11,8 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets +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 347fedac62..f685744228 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 @@ -18,3 +13,4 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets +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.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/mdi/mdi.pro b/examples/mainwindows/mdi/mdi.pro index 45f3bfb4a8..3112128d9b 100644 --- a/examples/mainwindows/mdi/mdi.pro +++ b/examples/mainwindows/mdi/mdi.pro @@ -13,3 +13,7 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets +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 2a1c3da71d..eae4e6e9ec 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("<i>Choose a menu option</i>")); +#else infoLabel = new QLabel(tr("<i>Choose a menu option, or right-click to " "invoke a context menu</i>")); +#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.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/menus/menus.pro b/examples/mainwindows/menus/menus.pro index f440f35423..cf117c25d2 100644 --- a/examples/mainwindows/menus/menus.pro +++ b/examples/mainwindows/menus/menus.pro @@ -13,3 +13,6 @@ symbian { CONFIG += qt_example } QT += widgets +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.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/recentfiles/recentfiles.pro b/examples/mainwindows/recentfiles/recentfiles.pro index 05da6f2972..ecc78f245a 100644 --- a/examples/mainwindows/recentfiles/recentfiles.pro +++ b/examples/mainwindows/recentfiles/recentfiles.pro @@ -10,3 +10,6 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets +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.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 diff --git a/examples/mainwindows/sdi/sdi.pro b/examples/mainwindows/sdi/sdi.pro index 964b791936..c8687614c2 100644 --- a/examples/mainwindows/sdi/sdi.pro +++ b/examples/mainwindows/sdi/sdi.pro @@ -11,3 +11,7 @@ INSTALLS += target sources symbian: CONFIG += qt_example QT += widgets +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) |