summaryrefslogtreecommitdiffstats
path: root/examples/richtext/orderform/detailsdialog.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-27 19:16:41 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-05-23 14:24:07 +0200
commit0748751c9f097d9d866605306bbdd4b96e2a5c4e (patch)
tree1838365e6ad6592a26e193289d2136cb89319972 /examples/richtext/orderform/detailsdialog.cpp
parent5feefb0c039dae04290d1fca7c2f24276b6f7582 (diff)
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/richtext/orderform/detailsdialog.cpp')
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/richtext/orderform/detailsdialog.cpp b/examples/richtext/orderform/detailsdialog.cpp
index 9aa8535c5b..b12de14d30 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);
}