summaryrefslogtreecommitdiffstats
path: root/examples/richtext
diff options
context:
space:
mode:
Diffstat (limited to 'examples/richtext')
-rw-r--r--examples/richtext/calendar/calendar.pro4
-rw-r--r--examples/richtext/calendar/main.cpp6
-rw-r--r--examples/richtext/calendar/mainwindow.cpp7
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp30
-rw-r--r--examples/richtext/orderform/main.cpp6
-rw-r--r--examples/richtext/orderform/orderform.pro1
-rw-r--r--examples/richtext/richtext.pro1
-rw-r--r--examples/richtext/syntaxhighlighter/main.cpp6
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.pro2
9 files changed, 62 insertions, 1 deletions
diff --git a/examples/richtext/calendar/calendar.pro b/examples/richtext/calendar/calendar.pro
index 7ecc8ab6b9..834b2c1a7e 100644
--- a/examples/richtext/calendar/calendar.pro
+++ b/examples/richtext/calendar/calendar.pro
@@ -2,6 +2,9 @@ HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
+# App cannot be with name "calendar" in Symbian due to same named system component.
+symbian: TARGET = calendarapp
+
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/calendar
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendar.pro
@@ -9,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/calendar
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/richtext/calendar/main.cpp b/examples/richtext/calendar/main.cpp
index b23e883e24..9c1141f0d1 100644
--- a/examples/richtext/calendar/main.cpp
+++ b/examples/richtext/calendar/main.cpp
@@ -46,7 +46,13 @@ 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)
+ window.show();
+#else
window.resize(640, 256);
window.show();
+#endif
return app.exec();
}
diff --git a/examples/richtext/calendar/mainwindow.cpp b/examples/richtext/calendar/mainwindow.cpp
index 5117c03ae4..60d7c51595 100644
--- a/examples/richtext/calendar/mainwindow.cpp
+++ b/examples/richtext/calendar/mainwindow.cpp
@@ -70,7 +70,6 @@ MainWindow::MainWindow()
QLabel *fontSizeLabel = new QLabel(tr("Font size:"));
QSpinBox *fontSizeSpinBox = new QSpinBox;
fontSizeSpinBox->setRange(1, 64);
- fontSizeSpinBox->setValue(10);
editor = new QTextBrowser;
insertCalendar();
@@ -83,6 +82,12 @@ MainWindow::MainWindow()
this, SLOT(setFontSize(int)));
//! [3]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+ fontSizeSpinBox->setValue(4);
+#else
+ fontSizeSpinBox->setValue(10);
+#endif
+
//! [4]
QHBoxLayout *controlsLayout = new QHBoxLayout;
controlsLayout->addWidget(dateLabel);
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);
}
diff --git a/examples/richtext/orderform/main.cpp b/examples/richtext/orderform/main.cpp
index 3ad32b8e4e..a89aa76015 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.pro b/examples/richtext/orderform/orderform.pro
index 6760dad7aa..a455500bc5 100644
--- a/examples/richtext/orderform/orderform.pro
+++ b/examples/richtext/orderform/orderform.pro
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/orderform
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/richtext/richtext.pro b/examples/richtext/richtext.pro
index 102181ec26..c9ed843a61 100644
--- a/examples/richtext/richtext.pro
+++ b/examples/richtext/richtext.pro
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/richtext/syntaxhighlighter/main.cpp b/examples/richtext/syntaxhighlighter/main.cpp
index eecfb12bdc..e0e5e4f407 100644
--- a/examples/richtext/syntaxhighlighter/main.cpp
+++ b/examples/richtext/syntaxhighlighter/main.cpp
@@ -46,7 +46,13 @@ 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)
+ window.show();
+#else
window.resize(640, 512);
window.show();
+#endif
return app.exec();
}
diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
index e981a912ad..93305ee426 100644
--- a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
+++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
@@ -17,3 +17,5 @@ wince*: {
addFiles.path = .
DEPLOYMENT += addFiles
}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+