diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
commit | 3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch) | |
tree | 58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/richtext/orderform | |
parent | ddb22795641253a026b72f752ebc769745dd41be (diff) | |
download | Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/richtext/orderform')
-rw-r--r-- | examples/richtext/orderform/detailsdialog.cpp | 30 | ||||
-rw-r--r-- | examples/richtext/orderform/main.cpp | 6 | ||||
-rw-r--r-- | examples/richtext/orderform/orderform.desktop | 11 | ||||
-rw-r--r-- | examples/richtext/orderform/orderform.pro | 2 |
4 files changed, 49 insertions, 0 deletions
diff --git a/examples/richtext/orderform/detailsdialog.cpp b/examples/richtext/orderform/detailsdialog.cpp index 9aa8535..b12de14 100644 --- a/examples/richtext/orderform/detailsdialog.cpp +++ b/examples/richtext/orderform/detailsdialog.cpp @@ -53,8 +53,13 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent) nameEdit = new QLineEdit; addressEdit = new QTextEdit; +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR) + offersCheckBox = new QCheckBox(tr("Send information about\n" + "products and special offers")); +#else offersCheckBox = new QCheckBox(tr("Send information about products and " "special offers")); +#endif setupItemsTable(); @@ -66,6 +71,30 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent) //! [0] //! [1] +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + QWidget *widgetSubscriber = new QWidget; + QGridLayout *subscriberLayout = new QGridLayout; + subscriberLayout->addWidget(nameLabel, 0, 0); + subscriberLayout->addWidget(nameEdit, 0, 1); + subscriberLayout->addWidget(addressLabel, 1, 0); + subscriberLayout->addWidget(addressEdit, 1, 1); + subscriberLayout->addWidget(offersCheckBox, 2, 0, 1, 2); + widgetSubscriber->setLayout(subscriberLayout); + + QWidget *widgetOrder = new QWidget; + QVBoxLayout *orderLayout = new QVBoxLayout; + orderLayout->addWidget(itemsTable); + widgetOrder->setLayout(orderLayout); + + QTabWidget *tabWidget = new QTabWidget; + tabWidget->addTab(widgetSubscriber, "Subscriber"); + tabWidget->addTab(widgetOrder, "Order"); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(tabWidget); + mainLayout->addWidget(buttonBox); + setLayout(mainLayout); +#else QGridLayout *mainLayout = new QGridLayout; mainLayout->addWidget(nameLabel, 0, 0); mainLayout->addWidget(nameEdit, 0, 1); @@ -75,6 +104,7 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent) mainLayout->addWidget(offersCheckBox, 2, 1, 1, 2); mainLayout->addWidget(buttonBox, 3, 0, 1, 3); setLayout(mainLayout); +#endif setWindowTitle(title); } diff --git a/examples/richtext/orderform/main.cpp b/examples/richtext/orderform/main.cpp index 3ad32b8..a89aa76 100644 --- a/examples/richtext/orderform/main.cpp +++ b/examples/richtext/orderform/main.cpp @@ -47,8 +47,14 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow window; +#if defined(Q_OS_SYMBIAN) + window.showMaximized(); +#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) + windows.show(); +#else window.resize(640, 480); window.show(); +#endif window.createSample(); return app.exec(); } diff --git a/examples/richtext/orderform/orderform.desktop b/examples/richtext/orderform/orderform.desktop new file mode 100644 index 0000000..4690cbc --- /dev/null +++ b/examples/richtext/orderform/orderform.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=Order Form +Exec=/opt/usr/bin/orderform +Icon=orderform +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro index dee2855..ebe2ece 100644 --- a/examples/richtext/orderform/orderform.pro +++ b/examples/richtext/orderform/orderform.pro @@ -11,3 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/richtext/orderform INSTALLS += target sources symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + |