summaryrefslogtreecommitdiffstats
path: root/examples/sql
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sql')
-rw-r--r--examples/sql/cachedtable/cachedtable.pro2
-rw-r--r--examples/sql/drilldown/drilldown.pro4
-rw-r--r--examples/sql/drilldown/informationwindow.cpp2
-rw-r--r--examples/sql/drilldown/main.cpp4
-rw-r--r--examples/sql/drilldown/view.cpp19
-rw-r--r--examples/sql/masterdetail/masterdetail.pro2
-rw-r--r--examples/sql/querymodel/querymodel.pro2
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.pro2
-rw-r--r--examples/sql/sql.pro16
-rw-r--r--examples/sql/tablemodel/tablemodel.pro2
10 files changed, 47 insertions, 8 deletions
diff --git a/examples/sql/cachedtable/cachedtable.pro b/examples/sql/cachedtable/cachedtable.pro
index a14aa42d8f..89e97aece0 100644
--- a/examples/sql/cachedtable/cachedtable.pro
+++ b/examples/sql/cachedtable/cachedtable.pro
@@ -9,3 +9,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/cachedtable
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS cachedtable.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/sql/cachedtable
INSTALLS += target sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/sql/drilldown/drilldown.pro b/examples/sql/drilldown/drilldown.pro
index e15a4ada6b..7907bd2393 100644
--- a/examples/sql/drilldown/drilldown.pro
+++ b/examples/sql/drilldown/drilldown.pro
@@ -14,3 +14,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/drilldown
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS drilldown.pro *.png *.jpg images
sources.path = $$[QT_INSTALL_EXAMPLES]/sql/drilldown
INSTALLS += target sources
+
+symbian:TARGET.UID3 = 0xA000C612
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp
index 6573ae1fdb..ea66b0ba58 100644
--- a/examples/sql/drilldown/informationwindow.cpp
+++ b/examples/sql/drilldown/informationwindow.cpp
@@ -101,7 +101,9 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
setWindowFlags(Qt::Window);
enableButtons(false);
setWindowTitle(tr("Office: %1").arg(locationText->text()));
+#ifndef Q_OS_SYMBIAN
resize(320, sizeHint().height());
+#endif
}
//! [4]
diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp
index ee5a4d59a8..c340f5ec96 100644
--- a/examples/sql/drilldown/main.cpp
+++ b/examples/sql/drilldown/main.cpp
@@ -54,6 +54,10 @@ int main(int argc, char *argv[])
return 1;
View view("offices", "images");
+#ifndef Q_OS_SYMBIAN
view.show();
+#else
+ view.showFullScreen();
+#endif
return app.exec();
}
diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp
index 763d094343..778767b315 100644
--- a/examples/sql/drilldown/view.cpp
+++ b/examples/sql/drilldown/view.cpp
@@ -62,10 +62,15 @@ View::View(const QString &offices, const QString &images, QWidget *parent)
QGraphicsPixmapItem *logo = scene->addPixmap(QPixmap(":/logo.png"));
logo->setPos(30, 515);
-
+
+#ifndef Q_OS_SYMBIAN
setMinimumSize(470, 620);
- setMaximumSize(470, 620);
- setWindowTitle(tr("Offices World Wide"));
+ setMaximumSize(470, 620);
+#else
+ setDragMode(QGraphicsView::ScrollHandDrag);
+#endif
+
+ setWindowTitle(tr("Offices World Wide"));
}
//! [1]
@@ -126,7 +131,11 @@ void View::showInformation(ImageItem *image)
window->raise();
window->activateWindow();
} else if (window && !window->isVisible()) {
+#ifndef Q_OS_SYMBIAN
window->show();
+#else
+ window->showFullScreen();
+#endif
} else {
InformationWindow *window;
window = new InformationWindow(id, officeTable, this);
@@ -134,8 +143,12 @@ void View::showInformation(ImageItem *image)
connect(window, SIGNAL(imageChanged(int, QString)),
this, SLOT(updateImage(int, QString)));
+#ifndef Q_OS_SYMBIAN
window->move(pos() + QPoint(20, 40));
window->show();
+#else
+ window->showFullScreen();
+#endif
informationWindows.append(window);
}
}
diff --git a/examples/sql/masterdetail/masterdetail.pro b/examples/sql/masterdetail/masterdetail.pro
index 205c54405c..2363e5450c 100644
--- a/examples/sql/masterdetail/masterdetail.pro
+++ b/examples/sql/masterdetail/masterdetail.pro
@@ -14,3 +14,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/masterdetail
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS masterdetail.pro *.xml images
sources.path = $$[QT_INSTALL_EXAMPLES]/sql/masterdetail
INSTALLS += target sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/sql/querymodel/querymodel.pro b/examples/sql/querymodel/querymodel.pro
index e0e0813890..f20898cc9d 100644
--- a/examples/sql/querymodel/querymodel.pro
+++ b/examples/sql/querymodel/querymodel.pro
@@ -11,3 +11,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/querymodel
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS querymodel.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/sql/querymodel
INSTALLS += target sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.pro b/examples/sql/relationaltablemodel/relationaltablemodel.pro
index 38f1e210cc..e57729ef91 100644
--- a/examples/sql/relationaltablemodel/relationaltablemodel.pro
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.pro
@@ -7,3 +7,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/relationaltablemodel
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS relationaltablemodel.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/sql/relationaltablemodel
INSTALLS += target sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro
index 6d0d4026f3..7bdff69fd7 100644
--- a/examples/sql/sql.pro
+++ b/examples/sql/sql.pro
@@ -1,12 +1,18 @@
TEMPLATE = subdirs
-SUBDIRS = cachedtable \
- drilldown \
- relationaltablemodel \
- sqlwidgetmapper
-!wince*: SUBDIRS += querymodel tablemodel masterdetail
+SUBDIRS = drilldown
+!symbian: SUBDIRS += cachedtable \
+ relationaltablemodel \
+ sqlwidgetmapper
+
+!wince*:!symbian: SUBDIRS += \
+ querymodel \
+ tablemodel \
+ masterdetail
# install
sources.files = connection.h sql.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/sql
INSTALLS += sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)
diff --git a/examples/sql/tablemodel/tablemodel.pro b/examples/sql/tablemodel/tablemodel.pro
index 4d099d09cf..7adf40c10b 100644
--- a/examples/sql/tablemodel/tablemodel.pro
+++ b/examples/sql/tablemodel/tablemodel.pro
@@ -7,3 +7,5 @@ target.path = $$[QT_INSTALL_EXAMPLES]/sql/tablemodel
sources.files = $$SOURCES *.h $$RESOURCES $$FORMS tablemodel.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/sql/tablemodel
INSTALLS += target sources
+
+include($$QT_SOURCE_TREE/examples/examplebase.pri)