Squashed commit of the changes from the mobile-examples repository
authorDavid Boddie <david.boddie@nokia.com>
Wed, 27 Apr 2011 17:16:41 +0000 (19:16 +0200)
committerDavid Boddie <david.boddie@nokia.com>
Mon, 23 May 2011 12:24:07 +0000 (14:24 +0200)
(4.7-generated-declarative branch).

474 files changed:
doc/src/examples/broadcastreceiver.qdoc
doc/src/examples/combowidgetmapper.qdoc
doc/src/examples/dragdroprobot.qdoc
doc/src/examples/elasticnodes.qdoc
doc/src/examples/rsslisting.qdoc
doc/src/tutorials/modelview.qdoc
examples/animation/animatedtiles/animatedtiles.pro
examples/animation/animatedtiles/main.cpp
examples/animation/appchooser/appchooser.pro
examples/animation/appchooser/main.cpp
examples/animation/easing/easing.pro
examples/animation/easing/form.ui
examples/animation/easing/main.cpp
examples/animation/easing/window.cpp
examples/animation/easing/window.h
examples/animation/moveblocks/main.cpp
examples/animation/moveblocks/moveblocks.pro
examples/animation/states/main.cpp
examples/animation/states/states.pro
examples/animation/stickman/graphicsview.cpp
examples/animation/stickman/graphicsview.h
examples/animation/stickman/lifecycle.cpp
examples/animation/stickman/lifecycle.h
examples/animation/stickman/main.cpp
examples/animation/stickman/stickman.pro
examples/dbus/complexpingpong/complexping.pro
examples/dbus/complexpingpong/complexpong.pro
examples/dbus/dbus-chat/dbus-chat.pro
examples/dbus/dbus.pro
examples/dbus/listnames/listnames.pro
examples/dbus/pingpong/ping.pro
examples/dbus/pingpong/pong.pro
examples/dbus/remotecontrolledcar/car/car.pro
examples/dbus/remotecontrolledcar/controller/controller.pro
examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
examples/desktop/desktop.pro
examples/desktop/screenshot/screenshot.pro
examples/dialogs/classwizard/classwizard.pro
examples/dialogs/configdialog/configdialog.pro
examples/dialogs/dialogs.pro
examples/dialogs/extension/extension.pro
examples/dialogs/extension/finddialog.cpp
examples/dialogs/extension/main.cpp
examples/dialogs/findfiles/findfiles.pro
examples/dialogs/findfiles/main.cpp
examples/dialogs/findfiles/window.cpp
examples/dialogs/findfiles/window.h
examples/dialogs/licensewizard/licensewizard.pro
examples/dialogs/sipdialog/sipdialog.pro
examples/dialogs/standarddialogs/dialog.cpp
examples/dialogs/standarddialogs/dialog.h
examples/dialogs/standarddialogs/main.cpp
examples/dialogs/standarddialogs/standarddialogs.pro
examples/dialogs/tabdialog/main.cpp
examples/dialogs/tabdialog/tabdialog.cpp
examples/dialogs/tabdialog/tabdialog.pro
examples/dialogs/trivialwizard/trivialwizard.cpp
examples/dialogs/trivialwizard/trivialwizard.pro
examples/draganddrop/draggableicons/draggableicons.pro
examples/draganddrop/draggableicons/dragwidget.cpp
examples/draganddrop/draggableicons/main.cpp
examples/draganddrop/draggabletext/draggabletext.pro
examples/draganddrop/draggabletext/dragwidget.cpp
examples/draganddrop/draggabletext/main.cpp
examples/draganddrop/dropsite/dropsite.pro
examples/draganddrop/fridgemagnets/dragwidget.cpp
examples/draganddrop/fridgemagnets/fridgemagnets.pro
examples/draganddrop/fridgemagnets/main.cpp
examples/draganddrop/puzzle/main.cpp
examples/draganddrop/puzzle/mainwindow.cpp
examples/draganddrop/puzzle/pieceslist.cpp
examples/draganddrop/puzzle/pieceslist.h
examples/draganddrop/puzzle/puzzle.pro
examples/draganddrop/puzzle/puzzlewidget.cpp
examples/draganddrop/puzzle/puzzlewidget.h
examples/effects/blurpicker/blurpicker.cpp
examples/effects/blurpicker/blurpicker.h
examples/effects/blurpicker/blurpicker.pro
examples/effects/blurpicker/main.cpp
examples/effects/fademessage/fademessage.cpp
examples/effects/fademessage/fademessage.pro
examples/effects/fademessage/main.cpp
examples/effects/lighting/lighting.cpp
examples/effects/lighting/lighting.h
examples/effects/lighting/lighting.pro
examples/effects/lighting/main.cpp
examples/examples.pro
examples/gestures/imagegestures/imagegestures.pro
examples/graphicsview/anchorlayout/anchorlayout.pro
examples/graphicsview/anchorlayout/main.cpp
examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
examples/graphicsview/basicgraphicslayouts/main.cpp
examples/graphicsview/collidingmice/collidingmice.pro
examples/graphicsview/collidingmice/main.cpp
examples/graphicsview/diagramscene/diagramscene.pro
examples/graphicsview/dragdroprobot/dragdroprobot.pro
examples/graphicsview/dragdroprobot/main.cpp
examples/graphicsview/elasticnodes/edge.cpp
examples/graphicsview/elasticnodes/elasticnodes.pro
examples/graphicsview/elasticnodes/graphwidget.cpp
examples/graphicsview/elasticnodes/graphwidget.h
examples/graphicsview/elasticnodes/main.cpp
examples/graphicsview/elasticnodes/node.cpp
examples/graphicsview/flowlayout/flowlayout.pro
examples/graphicsview/flowlayout/main.cpp
examples/graphicsview/graphicsview.pro
examples/graphicsview/padnavigator/main.cpp
examples/graphicsview/padnavigator/padnavigator.pro
examples/graphicsview/simpleanchorlayout/main.cpp
examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
examples/graphicsview/weatheranchorlayout/main.cpp
examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
examples/ipc/ipc.pro
examples/ipc/localfortuneclient/client.cpp
examples/ipc/localfortuneclient/client.h
examples/ipc/localfortuneclient/localfortuneclient.pro
examples/ipc/localfortuneclient/main.cpp
examples/ipc/localfortuneserver/localfortuneserver.pro
examples/ipc/localfortuneserver/main.cpp
examples/ipc/localfortuneserver/server.cpp
examples/ipc/localfortuneserver/server.h
examples/ipc/sharedmemory/sharedmemory.pro
examples/itemviews/addressbook/addressbook.pro
examples/itemviews/addressbook/main.cpp
examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
examples/itemviews/basicsortfiltermodel/main.cpp
examples/itemviews/basicsortfiltermodel/window.cpp
examples/itemviews/basicsortfiltermodel/window.h
examples/itemviews/chart/chart.pro
examples/itemviews/chart/main.cpp
examples/itemviews/coloreditorfactory/coloreditorfactory.pro
examples/itemviews/coloreditorfactory/main.cpp
examples/itemviews/combowidgetmapper/combowidgetmapper.pro
examples/itemviews/combowidgetmapper/main.cpp
examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
examples/itemviews/customsortfiltermodel/main.cpp
examples/itemviews/customsortfiltermodel/window.cpp
examples/itemviews/customsortfiltermodel/window.h
examples/itemviews/dirview/dirview.pro
examples/itemviews/dirview/main.cpp
examples/itemviews/editabletreemodel/editabletreemodel.pro
examples/itemviews/editabletreemodel/main.cpp
examples/itemviews/editabletreemodel/mainwindow.cpp
examples/itemviews/fetchmore/fetchmore.pro
examples/itemviews/fetchmore/main.cpp
examples/itemviews/frozencolumn/frozencolumn.pro
examples/itemviews/frozencolumn/main.cpp
examples/itemviews/itemviews.pro
examples/itemviews/pixelator/main.cpp
examples/itemviews/pixelator/pixelator.pro
examples/itemviews/pixelator/pixeldelegate.cpp
examples/itemviews/puzzle/main.cpp
examples/itemviews/puzzle/mainwindow.cpp
examples/itemviews/puzzle/piecesmodel.cpp
examples/itemviews/puzzle/piecesmodel.h
examples/itemviews/puzzle/puzzle.pro
examples/itemviews/puzzle/puzzlewidget.cpp
examples/itemviews/puzzle/puzzlewidget.h
examples/itemviews/simpledommodel/main.cpp
examples/itemviews/simpledommodel/simpledommodel.pro
examples/itemviews/simpletreemodel/main.cpp
examples/itemviews/simpletreemodel/simpletreemodel.pro
examples/itemviews/simplewidgetmapper/main.cpp
examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
examples/itemviews/spinboxdelegate/main.cpp
examples/itemviews/spinboxdelegate/spinboxdelegate.pro
examples/itemviews/stardelegate/main.cpp
examples/itemviews/stardelegate/stardelegate.pro
examples/ja_JP/linguist/hellotr/hellotr.pro
examples/layouts/basiclayouts/basiclayouts.pro
examples/layouts/basiclayouts/main.cpp
examples/layouts/borderlayout/borderlayout.pro
examples/layouts/borderlayout/main.cpp
examples/layouts/dynamiclayouts/dialog.cpp
examples/layouts/dynamiclayouts/dialog.h
examples/layouts/dynamiclayouts/dynamiclayouts.pro
examples/layouts/dynamiclayouts/main.cpp
examples/layouts/flowlayout/flowlayout.pro
examples/layouts/flowlayout/main.cpp
examples/layouts/flowlayout/window.cpp
examples/layouts/layouts.pro
examples/linguist/arrowpad/arrowpad.pro
examples/linguist/hellotr/hellotr.pro
examples/linguist/linguist.pro
examples/linguist/trollprint/trollprint.pro
examples/mainwindows/application/application.pro
examples/mainwindows/application/main.cpp
examples/mainwindows/dockwidgets/dockwidgets.pro
examples/mainwindows/mainwindows.pro
examples/mainwindows/mdi/main.cpp
examples/mainwindows/mdi/mdi.pro
examples/mainwindows/menus/main.cpp
examples/mainwindows/menus/mainwindow.cpp
examples/mainwindows/menus/menus.pro
examples/mainwindows/recentfiles/main.cpp
examples/mainwindows/recentfiles/recentfiles.pro
examples/mainwindows/sdi/main.cpp
examples/mainwindows/sdi/sdi.pro
examples/network/bearermonitor/bearermonitor.cpp
examples/network/bearermonitor/bearermonitor.h
examples/network/bearermonitor/bearermonitor.pro
examples/network/blockingfortuneclient/blockingclient.cpp
examples/network/blockingfortuneclient/blockingclient.h
examples/network/blockingfortuneclient/blockingfortuneclient.pro
examples/network/blockingfortuneclient/main.cpp
examples/network/broadcastreceiver/broadcastreceiver.pro
examples/network/broadcastreceiver/main.cpp
examples/network/broadcastreceiver/receiver.cpp
examples/network/broadcastreceiver/receiver.h
examples/network/broadcastsender/broadcastsender.pro
examples/network/broadcastsender/main.cpp
examples/network/broadcastsender/sender.cpp
examples/network/broadcastsender/sender.h
examples/network/download/download.pro
examples/network/downloadmanager/downloadmanager.pro
examples/network/fortuneclient/fortuneclient.pro
examples/network/fortuneserver/fortuneserver.pro
examples/network/googlesuggest/googlesuggest.pro
examples/network/http/http.pro
examples/network/http/httpwindow.cpp
examples/network/http/httpwindow.h
examples/network/http/main.cpp
examples/network/loopback/dialog.cpp
examples/network/loopback/dialog.h
examples/network/loopback/loopback.pro
examples/network/loopback/main.cpp
examples/network/network-chat/network-chat.pro
examples/network/network.pro
examples/network/qftp/ftpwindow.cpp
examples/network/qftp/qftp.pro
examples/network/securesocketclient/certificateinfo.cpp
examples/network/securesocketclient/certificateinfo.ui
examples/network/securesocketclient/main.cpp
examples/network/securesocketclient/securesocketclient.pro
examples/network/securesocketclient/sslclient.cpp
examples/network/securesocketclient/sslclient.ui
examples/network/securesocketclient/sslerrors.ui
examples/network/threadedfortuneserver/dialog.cpp
examples/network/threadedfortuneserver/dialog.h
examples/network/threadedfortuneserver/main.cpp
examples/network/threadedfortuneserver/threadedfortuneserver.pro
examples/network/torrent/torrent.pro
examples/opengl/2dpainting/2dpainting.pro
examples/opengl/framebufferobject2/framebufferobject2.pro
examples/opengl/grabber/grabber.pro
examples/opengl/hellogl/hellogl.pro
examples/opengl/hellogl_es/hellogl_es.pro
examples/opengl/hellogl_es2/hellogl_es2.pro
examples/opengl/opengl.pro
examples/opengl/overpainting/overpainting.pro
examples/opengl/pbuffers/pbuffers.pro
examples/opengl/pbuffers2/pbuffers2.pro
examples/opengl/samplebuffers/samplebuffers.pro
examples/opengl/textures/textures.pro
examples/openvg/openvg.pro
examples/painting/basicdrawing/basicdrawing.pro
examples/painting/basicdrawing/main.cpp
examples/painting/basicdrawing/window.cpp
examples/painting/concentriccircles/concentriccircles.pro
examples/painting/concentriccircles/main.cpp
examples/painting/fontsampler/fontsampler.pro
examples/painting/fontsampler/main.cpp
examples/painting/fontsampler/mainwindow.cpp
examples/painting/fontsampler/mainwindow.h
examples/painting/fontsampler/mainwindowbase.ui
examples/painting/imagecomposition/imagecomposer.cpp
examples/painting/imagecomposition/imagecomposition.pro
examples/painting/imagecomposition/main.cpp
examples/painting/painterpaths/main.cpp
examples/painting/painterpaths/painterpaths.pro
examples/painting/painterpaths/window.cpp
examples/painting/painterpaths/window.h
examples/painting/painting.pro
examples/painting/transformations/main.cpp
examples/painting/transformations/transformations.pro
examples/qtconcurrent/imagescaling/imagescaling.pro
examples/qtconcurrent/imagescaling/main.cpp
examples/qtconcurrent/map/main.cpp
examples/qtconcurrent/map/map.pro
examples/qtconcurrent/progressdialog/main.cpp
examples/qtconcurrent/progressdialog/progressdialog.pro
examples/qtconcurrent/qtconcurrent.pro
examples/qtconcurrent/runfunction/main.cpp
examples/qtconcurrent/runfunction/runfunction.pro
examples/qtconcurrent/wordcount/main.cpp
examples/qtconcurrent/wordcount/wordcount.pro
examples/qtestlib/qtestlib.pro
examples/qtestlib/tutorial1/tutorial1.pro
examples/qtestlib/tutorial2/tutorial2.pro
examples/qtestlib/tutorial3/tutorial3.pro
examples/qtestlib/tutorial4/tutorial4.pro
examples/qtestlib/tutorial5/tutorial5.pro
examples/qws/dbscreen/dbscreen.pro
examples/qws/framebuffer/framebuffer.pro
examples/qws/mousecalibration/mousecalibration.pro
examples/qws/simpledecoration/simpledecoration.pro
examples/qws/svgalib/svgalib.pro
examples/richtext/calendar/calendar.pro
examples/richtext/calendar/main.cpp
examples/richtext/calendar/mainwindow.cpp
examples/richtext/orderform/detailsdialog.cpp
examples/richtext/orderform/main.cpp
examples/richtext/orderform/orderform.pro
examples/richtext/richtext.pro
examples/richtext/syntaxhighlighter/main.cpp
examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
examples/sql/cachedtable/cachedtable.pro
examples/sql/cachedtable/main.cpp
examples/sql/cachedtable/tableeditor.cpp
examples/sql/cachedtable/tableeditor.h
examples/sql/drilldown/drilldown.pro
examples/sql/drilldown/informationwindow.cpp
examples/sql/drilldown/main.cpp
examples/sql/drilldown/view.cpp
examples/sql/masterdetail/main.cpp
examples/sql/masterdetail/mainwindow.cpp
examples/sql/masterdetail/masterdetail.pro
examples/sql/querymodel/main.cpp
examples/sql/querymodel/querymodel.pro
examples/sql/relationaltablemodel/relationaltablemodel.cpp
examples/sql/relationaltablemodel/relationaltablemodel.pro
examples/sql/sql.pro
examples/sql/sqlwidgetmapper/main.cpp
examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
examples/sql/tablemodel/tablemodel.cpp
examples/sql/tablemodel/tablemodel.pro
examples/statemachine/eventtransitions/eventtransitions.pro
examples/statemachine/eventtransitions/main.cpp
examples/statemachine/factorial/factorial.pro
examples/statemachine/pingpong/pingpong.pro
examples/statemachine/rogue/main.cpp
examples/statemachine/rogue/movementtransition.h
examples/statemachine/rogue/rogue.pro
examples/statemachine/rogue/window.cpp
examples/statemachine/rogue/window.h
examples/statemachine/trafficlight/main.cpp
examples/statemachine/trafficlight/trafficlight.pro
examples/statemachine/twowaybutton/main.cpp
examples/statemachine/twowaybutton/twowaybutton.pro
examples/threads/mandelbrot/main.cpp
examples/threads/mandelbrot/mandelbrot.pro
examples/threads/mandelbrot/mandelbrotwidget.cpp
examples/threads/mandelbrot/mandelbrotwidget.h
examples/threads/queuedcustomtype/main.cpp
examples/threads/queuedcustomtype/queuedcustomtype.pro
examples/threads/semaphores/semaphores.cpp
examples/threads/semaphores/semaphores.pro
examples/threads/threads.pro
examples/threads/waitconditions/waitconditions.cpp
examples/threads/waitconditions/waitconditions.pro
examples/tools/codecs/codecs.pro
examples/tools/completer/completer.pro
examples/tools/contiguouscache/contiguouscache.pro
examples/tools/customcompleter/customcompleter.pro
examples/tools/customtype/customtype.pro
examples/tools/customtypesending/customtypesending.pro
examples/tools/echoplugin/echoplugin.pro
examples/tools/echoplugin/echowindow/echowindow.pro
examples/tools/echoplugin/plugin/plugin.pro
examples/tools/i18n/i18n.pro
examples/tools/inputpanel/inputpanel.pro
examples/tools/plugandpaint/plugandpaint.pro
examples/tools/plugandpaintplugins/basictools/basictools.pro
examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
examples/tools/plugandpaintplugins/plugandpaintplugins.pro
examples/tools/regexp/regexp.pro
examples/tools/settingseditor/settingseditor.pro
examples/tools/styleplugin/plugin/plugin.pro
examples/tools/styleplugin/styleplugin.pro
examples/tools/styleplugin/stylewindow/stylewindow.pro
examples/tools/tools.pro
examples/tools/treemodelcompleter/treemodelcompleter.pro
examples/tools/undoframework/undoframework.pro
examples/touch/dials/dials.pro
examples/touch/fingerpaint/fingerpaint.pro
examples/touch/knobs/knobs.pro
examples/touch/pinchzoom/pinchzoom.pro
examples/tutorials/addressbook-fr/addressbook-fr.pro
examples/tutorials/addressbook-fr/part1/part1.pro
examples/tutorials/addressbook-fr/part2/part2.pro
examples/tutorials/addressbook-fr/part3/part3.pro
examples/tutorials/addressbook-fr/part4/part4.pro
examples/tutorials/addressbook-fr/part5/part5.pro
examples/tutorials/addressbook-fr/part6/part6.pro
examples/tutorials/addressbook-fr/part7/part7.pro
examples/tutorials/addressbook/addressbook.pro
examples/tutorials/addressbook/part1/part1.pro
examples/tutorials/addressbook/part2/part2.pro
examples/tutorials/addressbook/part3/part3.pro
examples/tutorials/addressbook/part4/part4.pro
examples/tutorials/addressbook/part5/part5.pro
examples/tutorials/addressbook/part6/part6.pro
examples/tutorials/addressbook/part7/part7.pro
examples/tutorials/modelview/1_readonly/1_readonly.pro
examples/tutorials/modelview/2_formatting/2_formatting.pro
examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
examples/tutorials/modelview/4_headers/4_headers.pro
examples/tutorials/modelview/5_edit/5_edit.pro
examples/tutorials/modelview/6_treeview/6_treeview.pro
examples/tutorials/modelview/7_selections/7_selections.pro
examples/tutorials/modelview/modelview.pro
examples/tutorials/widgets/childwidget/childwidget.pro
examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro
examples/tutorials/widgets/toplevel/toplevel.pro
examples/tutorials/widgets/windowlayout/windowlayout.pro
examples/uitools/multipleinheritance/main.cpp
examples/uitools/multipleinheritance/multipleinheritance.pro
examples/uitools/textfinder/textfinder.pro
examples/uitools/uitools.pro
examples/widgets/analogclock/analogclock.pro
examples/widgets/analogclock/main.cpp
examples/widgets/calculator/calculator.cpp
examples/widgets/calculator/calculator.h
examples/widgets/calculator/calculator.pro
examples/widgets/calculator/main.cpp
examples/widgets/calendarwidget/calendarwidget.pro
examples/widgets/charactermap/charactermap.pro
examples/widgets/codeeditor/codeeditor.pro
examples/widgets/codeeditor/main.cpp
examples/widgets/digitalclock/digitalclock.pro
examples/widgets/digitalclock/main.cpp
examples/widgets/groupbox/groupbox.pro
examples/widgets/groupbox/main.cpp
examples/widgets/icons/icons.pro
examples/widgets/icons/main.cpp
examples/widgets/imageviewer/imageviewer.pro
examples/widgets/imageviewer/main.cpp
examples/widgets/lineedits/lineedits.pro
examples/widgets/lineedits/main.cpp
examples/widgets/movie/main.cpp
examples/widgets/movie/movie.pro
examples/widgets/scribble/main.cpp
examples/widgets/scribble/scribble.pro
examples/widgets/shapedclock/main.cpp
examples/widgets/shapedclock/shapedclock.pro
examples/widgets/sliders/main.cpp
examples/widgets/sliders/sliders.pro
examples/widgets/softkeys/softkeys.pro
examples/widgets/spinboxes/main.cpp
examples/widgets/spinboxes/spinboxes.pro
examples/widgets/styles/styles.pro
examples/widgets/stylesheet/main.cpp
examples/widgets/stylesheet/stylesheet.pro
examples/widgets/tablet/main.cpp
examples/widgets/tablet/tablet.pro
examples/widgets/tetrix/main.cpp
examples/widgets/tetrix/tetrix.pro
examples/widgets/tooltips/main.cpp
examples/widgets/tooltips/tooltips.pro
examples/widgets/validators/main.cpp
examples/widgets/validators/validators.pro
examples/widgets/widgets.pro
examples/widgets/wiggly/main.cpp
examples/widgets/wiggly/wiggly.pro
examples/widgets/windowflags/main.cpp
examples/widgets/windowflags/windowflags.pro
examples/xml/dombookmarks/dombookmarks.pro
examples/xml/dombookmarks/main.cpp
examples/xml/dombookmarks/mainwindow.cpp
examples/xml/htmlinfo/htmlinfo.pro
examples/xml/htmlinfo/main.cpp
examples/xml/rsslisting/main.cpp
examples/xml/rsslisting/rsslisting.cpp
examples/xml/rsslisting/rsslisting.h
examples/xml/rsslisting/rsslisting.pro
examples/xml/saxbookmarks/saxbookmarks.pro
examples/xml/streambookmarks/main.cpp
examples/xml/streambookmarks/mainwindow.cpp
examples/xml/streambookmarks/streambookmarks.pro
examples/xml/xml.pro
examples/xml/xmlstreamlint/xmlstreamlint.pro
qmake/generators/symbian/symbiancommon.h
src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
src/gui/kernel/qwidget.cpp

index ea3c331..3d127dc 100644 (file)
@@ -29,7 +29,7 @@
     \example network/broadcastreceiver
     \title Broadcast Receiver Example
 
-    The Broadcast Receiever example shows how to receive information that is broadcasted
+    The Broadcast Receiver example shows how to receive information that is broadcasted
     over a local network.
 
     \image broadcastreceiver-example.png
index 897d135..e305052 100644 (file)
@@ -29,7 +29,7 @@
     \example itemviews/combowidgetmapper
     \title Combo Widget Mapper Example
 
-    The Delegate Widget Mapper example shows how to use a custom delegate to
+    The Combo Widget Mapper example shows how to use a custom delegate to
     map information from a model to specific widgets on a form.
 
     \image combowidgetmapper-example.png
index bcf0fe7..0a09314 100644 (file)
@@ -29,7 +29,7 @@
     \example graphicsview/dragdroprobot
     \title Drag and Drop Robot Example
 
-    This GraphicsView example shows how to implement Drag and Drop in a
+    The Drag and Drop Robot example shows how to implement Drag and Drop in a
     QGraphicsItem subclass, as well as how to animate items using Qt's
     \l{Animation Framework}.
 
index bba6d90..8526d55 100644 (file)
@@ -29,7 +29,7 @@
     \example graphicsview/elasticnodes
     \title Elastic Nodes Example
 
-    This GraphicsView example shows how to implement edges between nodes in a
+    The Elastic Nodes example shows how to implement edges between nodes in a
     graph, with basic interaction. You can click to drag a node around, and
     zoom in and out using the mouse wheel or the keyboard. Hitting the space
     bar will randomize the nodes. The example is also resolution independent;
index ca29c04..6bef665 100644 (file)
@@ -29,7 +29,7 @@
     \example xml/rsslisting
     \title RSS-Listing Example
 
-    This example shows how to create a widget that displays news items
+    The RSS-Listing example shows how to create a widget that displays news items
     from RDF news sources.
 
     \image rsslistingexample.png
index efd0ff2..ed08252 100644 (file)
     array of the data elements that the user can change. The table widget can be
     integrated into a program flow by reading and writing the data elements that
     the table widget provides. 
-
     This method is very intuitive and useful in many applications, but displaying 
     and editing a database table with a standard table widget can be problematic.
     Two copies of the data have to be coordinated: one outside the
index 763357f..3182c20 100644 (file)
@@ -11,3 +11,4 @@ symbian {
     TARGET.UID3 = 0xA000D7D1
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 1badb4f..46b5d1d 100644 (file)
@@ -210,7 +210,11 @@ int main(int argc, char **argv)
     view->setBackgroundBrush(bgPix);
     view->setCacheMode(QGraphicsView::CacheBackground);
     view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+#ifdef Q_OS_SYMBIAN
+    view->showMaximized();
+#else
     view->show();
+#endif
 
     QStateMachine states;
     states.addState(rootState);
index 65e2345..7b735d9 100644 (file)
@@ -11,3 +11,4 @@ symbian {
     TARGET.UID3 = 0xA000E3F5
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 86ec073..3788533 100644 (file)
@@ -80,6 +80,21 @@ private:
     QPixmap p;
 };
 
+class GraphicsView : public QGraphicsView
+{
+    Q_OBJECT
+public:
+    GraphicsView(QGraphicsScene *scene, QWidget *parent = 0) : QGraphicsView(scene, parent)
+    {
+    }
+
+    virtual void resizeEvent(QResizeEvent *event)
+    {
+        fitInView(sceneRect(), Qt::KeepAspectRatio);
+    }
+};
+
+
 void createStates(const QObjectList &objects,
                   const QRect &selectedRect, QState *parent)
 {
@@ -112,10 +127,10 @@ int main(int argc, char **argv)
     p3->setObjectName("p3");
     p4->setObjectName("p4");
 
-    p1->setGeometry(QRectF(0.0, 0.0, 64.0, 64.0));
-    p2->setGeometry(QRectF(236.0, 0.0, 64.0, 64.0));
+    p1->setGeometry(QRectF(  0.0,   0.0, 64.0, 64.0));
+    p2->setGeometry(QRectF(236.0,   0.0, 64.0, 64.0));
     p3->setGeometry(QRectF(236.0, 236.0, 64.0, 64.0));
-    p4->setGeometry(QRectF(0.0, 236.0, 64.0, 64.0));
+    p4->setGeometry(QRectF(  0.0, 236.0, 64.0, 64.0));
 
     QGraphicsScene scene(0, 0, 300, 300);
     scene.setBackgroundBrush(Qt::white);
@@ -124,7 +139,7 @@ int main(int argc, char **argv)
     scene.addItem(p3);
     scene.addItem(p4);
 
-    QGraphicsView window(&scene);
+    GraphicsView window(&scene);
     window.setFrameStyle(0);
     window.setAlignment(Qt::AlignLeft | Qt::AlignTop);
     window.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
@@ -135,12 +150,13 @@ int main(int argc, char **argv)
 
     QState *group = new QState(&machine);
     group->setObjectName("group");
+
     QRect selectedRect(86, 86, 128, 128);
 
     QState *idleState = new QState(group);
     group->setInitialState(idleState);
 
-    QObjectList objects; 
+    QObjectList objects;
     objects << p1 << p2 << p3 << p4;
     createStates(objects, selectedRect, group);
     createAnimations(objects, &machine);
@@ -148,8 +164,12 @@ int main(int argc, char **argv)
     machine.setInitialState(group);
     machine.start();
 
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    window.showMaximized();
+#else
     window.resize(300, 300);
     window.show();
+#endif
 
     return app.exec();
 }
index 3a10004..0d5eaf4 100644 (file)
@@ -5,7 +5,7 @@ SOURCES = main.cpp \
 
 FORMS   = form.ui
 
-RESOURCES     = easing.qrc
+RESOURCES = easing.qrc
 
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/easing
@@ -17,3 +17,5 @@ symbian {
     TARGET.UID3 = 0xA000E3F6
     CONFIG += qt_example
 }
+
+maemo5: CONFIG += qt_example
index b60ade8..364aebe 100644 (file)
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
       <widget class="QGroupBox" name="groupBox_2">
+       <property name="maximumSize">
+        <size>
+         <width>16777215</width>
+         <height>16777215</height>
+        </size>
+       </property>
        <property name="title">
         <string>Path type</string>
        </property>
-       <layout class="QVBoxLayout" name="verticalLayout_2">
-        <item>
+       <layout class="QGridLayout" name="gridLayout_2">
+        <item row="0" column="0">
          <widget class="QRadioButton" name="lineRadio">
+          <property name="maximumSize">
+           <size>
+            <width>16777215</width>
+            <height>40</height>
+           </size>
+          </property>
+          <property name="layoutDirection">
+           <enum>Qt::LeftToRight</enum>
+          </property>
           <property name="text">
            <string>Line</string>
           </property>
           </attribute>
          </widget>
         </item>
-        <item>
+        <item row="1" column="0">
          <widget class="QRadioButton" name="circleRadio">
+          <property name="maximumSize">
+           <size>
+            <width>16777215</width>
+            <height>40</height>
+           </size>
+          </property>
           <property name="text">
            <string>Circle</string>
           </property>
         </property>
         <item row="0" column="0">
          <widget class="QLabel" name="label">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
           <property name="text">
            <string>Period</string>
           </property>
           <property name="enabled">
            <bool>false</bool>
           </property>
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
           <property name="minimum">
            <double>-1.000000000000000</double>
           </property>
           </property>
          </widget>
         </item>
-        <item row="1" column="0">
-         <widget class="QLabel" name="label_2">
-          <property name="text">
-           <string>Amplitude</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
+        <item row="2" column="1">
          <widget class="QDoubleSpinBox" name="amplitudeSpinBox">
           <property name="enabled">
            <bool>false</bool>
           </property>
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
           <property name="minimum">
            <double>-1.000000000000000</double>
           </property>
           </property>
          </widget>
         </item>
-        <item row="2" column="0">
+        <item row="4" column="0">
          <widget class="QLabel" name="label_3">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
           <property name="text">
            <string>Overshoot</string>
           </property>
          </widget>
         </item>
-        <item row="2" column="1">
+        <item row="4" column="1">
          <widget class="QDoubleSpinBox" name="overshootSpinBox">
           <property name="enabled">
            <bool>false</bool>
           </property>
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
           <property name="minimum">
            <double>-1.000000000000000</double>
           </property>
           </property>
          </widget>
         </item>
+        <item row="2" column="0">
+         <widget class="QLabel" name="label_2">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>30</height>
+           </size>
+          </property>
+          <property name="text">
+           <string>Amplitude</string>
+          </property>
+         </widget>
+        </item>
        </layout>
       </widget>
      </item>
index def1db2..66a6958 100644 (file)
@@ -46,7 +46,15 @@ int main(int argc, char **argv)
     Q_INIT_RESOURCE(easing);
     QApplication app(argc, argv);
     Window w;
+
+#if defined(Q_OS_SYMBIAN)
+    w.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    w.show();
+#else
     w.resize(400, 400);
     w.show();
+#endif
+
     return app.exec();
 }
index b466cec..869bca4 100644 (file)
 #include "window.h"
 
 Window::Window(QWidget *parent)
-    : QWidget(parent), m_iconSize(64, 64)
+    : QWidget(parent),
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+    m_iconSize(32, 32)
+#else
+    m_iconSize(64, 64)
+#endif
 {
     m_ui.setupUi(this);
     QButtonGroup *buttonGroup = findChild<QButtonGroup *>();     // ### workaround for uic in 4.4
index bbdf14e..17899a4 100644 (file)
@@ -39,7 +39,6 @@
 ****************************************************************************/
 
 #include <QtGui>
-
 #include "ui_form.h"
 #include "animation.h"
 
@@ -73,6 +72,4 @@ private:
     PixmapItem *m_item;
     Animation *m_anim;
     QSize m_iconSize;
-
-
 };
index 3194c1b..ca1876f 100644 (file)
@@ -154,25 +154,28 @@ QState *createGeometryState(QObject *w1, const QRect &rect1,
 }
 //![13]
 
+
+class GraphicsView : public QGraphicsView
+{
+    Q_OBJECT
+public:
+    GraphicsView(QGraphicsScene *scene, QWidget *parent = NULL) : QGraphicsView(scene, parent)
+    {
+    }
+
+protected:
+    virtual void resizeEvent(QResizeEvent *event)
+    {
+        fitInView(scene()->sceneRect());
+        QGraphicsView::resizeEvent(event);
+    }
+};
+
+
 int main(int argc, char **argv)
 {
     QApplication app(argc, argv);
 
-#if 0
-    QWidget window;
-    QPalette palette;
-    palette.setBrush(QPalette::Window, Qt::black);
-    window.setPalette(palette);
-    QPushButton *button1 = new QPushButton("A", &window);
-    QPushButton *button2 = new QPushButton("B", &window);
-    QPushButton *button3 = new QPushButton("C", &window);
-    QPushButton *button4 = new QPushButton("D", &window);
-
-    button1->setObjectName("button1");
-    button2->setObjectName("button2");
-    button3->setObjectName("button3");
-    button4->setObjectName("button4");
-#else
 //![1]
     QGraphicsRectWidget *button1 = new QGraphicsRectWidget;
     QGraphicsRectWidget *button2 = new QGraphicsRectWidget;
@@ -188,12 +191,11 @@ int main(int argc, char **argv)
     scene.addItem(button3);
     scene.addItem(button4);
 //![1]
-    QGraphicsView window(&scene);
+    GraphicsView window(&scene);
     window.setFrameStyle(0);
     window.setAlignment(Qt::AlignLeft | Qt::AlignTop);
     window.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
     window.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-#endif
 //![2]
     QStateMachine machine;
 
@@ -308,8 +310,13 @@ int main(int argc, char **argv)
     machine.start();
 //![9]
 
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    window.showMaximized();
+    window.fitInView(scene.sceneRect() );
+#else
     window.resize(300, 300);
     window.show();
+#endif
 
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
 
index b9c8542..b49495d 100644 (file)
@@ -10,3 +10,4 @@ symbian {
     TARGET.UID3 = 0xA000E3F7
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 1565489..d49aa41 100644 (file)
@@ -62,6 +62,19 @@ private:
     QPixmap p;
 };
 
+class GraphicsView : public QGraphicsView
+{
+public:
+    GraphicsView(QGraphicsScene *scene) : QGraphicsView(scene)
+    {
+    }
+
+    virtual void resizeEvent(QResizeEvent *event)
+    {
+        fitInView(sceneRect(), Qt::KeepAspectRatio);
+    }
+};
+
 int main(int argc, char *argv[])
 {
     Q_INIT_RESOURCE(states);
@@ -130,12 +143,12 @@ int main(int argc, char *argv[])
     state1->assignProperty(button, "text", "Switch to state 2");
     state1->assignProperty(widget, "geometry", QRectF(0, 0, 400, 150));
     state1->assignProperty(box, "geometry", QRect(-200, 150, 200, 150));
-    state1->assignProperty(p1, "pos", QPointF(68, 185));
-    state1->assignProperty(p2, "pos", QPointF(168, 185));
-    state1->assignProperty(p3, "pos", QPointF(268, 185));
-    state1->assignProperty(p4, "pos", QPointF(68-150, 48-150));
-    state1->assignProperty(p5, "pos", QPointF(168, 48-150));
-    state1->assignProperty(p6, "pos", QPointF(268+150, 48-150));
+    state1->assignProperty(p1, "pos", QPointF(68, 200)); // 185));
+    state1->assignProperty(p2, "pos", QPointF(168, 200)); // 185));
+    state1->assignProperty(p3, "pos", QPointF(268, 200)); // 185));
+    state1->assignProperty(p4, "pos", QPointF(68 - 150, 48 - 150));
+    state1->assignProperty(p5, "pos", QPointF(168, 48 - 150));
+    state1->assignProperty(p6, "pos", QPointF(268 + 150, 48 - 150));
     state1->assignProperty(p1, "rotation", qreal(0));
     state1->assignProperty(p2, "rotation", qreal(0));
     state1->assignProperty(p3, "rotation", qreal(0));
@@ -154,9 +167,9 @@ int main(int argc, char *argv[])
     state2->assignProperty(button, "text", "Switch to state 3");
     state2->assignProperty(widget, "geometry", QRectF(200, 150, 200, 150));
     state2->assignProperty(box, "geometry", QRect(9, 150, 190, 150));
-    state2->assignProperty(p1, "pos", QPointF(68-150, 185+150));
-    state2->assignProperty(p2, "pos", QPointF(168, 185+150));
-    state2->assignProperty(p3, "pos", QPointF(268+150, 185+150));
+    state2->assignProperty(p1, "pos", QPointF(68 - 150, 185 + 150));
+    state2->assignProperty(p2, "pos", QPointF(168, 185 + 150));
+    state2->assignProperty(p3, "pos", QPointF(268 + 150, 185 + 150));
     state2->assignProperty(p4, "pos", QPointF(64, 48));
     state2->assignProperty(p5, "pos", QPointF(168, 48));
     state2->assignProperty(p6, "pos", QPointF(268, 48));
@@ -262,8 +275,13 @@ int main(int argc, char *argv[])
 
     machine.start();
 
-    QGraphicsView view(&scene);
+    GraphicsView view(&scene);
+
+#if defined(Q_OS_SYMBIAN)
+    view.showMaximized();
+#else
     view.show();
+#endif
 
     return app.exec();
 }
index 00963fe..56b3c51 100644 (file)
@@ -11,3 +11,4 @@ symbian {
     TARGET.UID3 = 0xA000E3F8
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 23036ef..0f7ce5f 100644 (file)
@@ -54,4 +54,7 @@ void GraphicsView::keyPressEvent(QKeyEvent *e)
     emit keyPressed(Qt::Key(e->key()));
 }
 
-
+void GraphicsView::resizeEvent(QResizeEvent *event)
+{
+    fitInView(scene()->sceneRect());
+}
index 9cf87b6..400e4a6 100644 (file)
@@ -51,6 +51,7 @@ public:
     GraphicsView(QWidget *parent = 0);
 
 protected:
+    virtual void resizeEvent(QResizeEvent *event);
     void keyPressEvent(QKeyEvent *);
 
 signals:
index 4abcdc2..8e9dbe1 100644 (file)
@@ -159,10 +159,14 @@ void LifeCycle::start()
     m_machine->start();
 }
 
-void LifeCycle::addActivity(const QString &fileName, Qt::Key key)
+void LifeCycle::addActivity(const QString &fileName, Qt::Key key, QObject *sender, const char *signal)
 {
     QState *state = makeState(m_alive, fileName);
     m_alive->addTransition(new KeyPressTransition(m_keyReceiver, key, state));
+
+    if((sender != NULL) || (signal != NULL)) {
+        m_alive->addTransition(sender, signal, state);
+    }
 }
 
 QState *LifeCycle::makeState(QState *parentState, const QString &animationFileName)
index 1bf3661..ca1a052 100644 (file)
@@ -50,6 +50,7 @@ class QAnimationGroup;
 class QState;
 class QAbstractState;
 class QAbstractTransition;
+class QObject;
 QT_END_NAMESPACE
 class GraphicsView;
 class LifeCycle
@@ -59,7 +60,7 @@ public:
     ~LifeCycle();
 
     void setDeathAnimation(const QString &fileName);
-    void addActivity(const QString &fileName, Qt::Key key);    
+    void addActivity(const QString &fileName, Qt::Key key, QObject *sender = NULL, const char *signal = NULL);
 
     void start();
 
index 08df766..902e572 100644 (file)
@@ -43,6 +43,7 @@
 #include "lifecycle.h"
 #include "stickman.h"
 #include "graphicsview.h"
+#include "rectbutton.h"
 
 #include <QtCore>
 #include <QtGui>
@@ -55,6 +56,11 @@ int main(int argc, char **argv)
     StickMan *stickMan = new StickMan;
     stickMan->setDrawSticks(false);
 
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    RectButton *buttonJump = new RectButton("Jump"); buttonJump->setPos(100, 125);
+    RectButton *buttonDance = new RectButton("Dance"); buttonDance->setPos(100, 200);
+    RectButton *buttonChill = new RectButton("Chill"); buttonChill->setPos(100, 275);
+#else
     QGraphicsTextItem *textItem = new QGraphicsTextItem();
     textItem->setHtml("<font color=\"white\"><b>Stickman</b>"
         "<p>"
@@ -71,31 +77,55 @@ int main(int argc, char **argv)
     qreal w = textItem->boundingRect().width();
     QRectF stickManBoundingRect = stickMan->mapToScene(stickMan->boundingRect()).boundingRect();
     textItem->setPos(-w / 2.0, stickManBoundingRect.bottom() + 25.0);
+#endif
 
     QGraphicsScene scene;
     scene.addItem(stickMan);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    scene.addItem(buttonJump);
+    scene.addItem(buttonDance);
+    scene.addItem(buttonChill);
+#else
     scene.addItem(textItem);
+#endif
     scene.setBackgroundBrush(Qt::black);
 
     GraphicsView view;
     view.setRenderHints(QPainter::Antialiasing);
     view.setTransformationAnchor(QGraphicsView::NoAnchor);
     view.setScene(&scene);
-    view.show();
-    view.setFocus();
 
     QRectF sceneRect = scene.sceneRect();
     // making enough room in the scene for stickman to jump and die
     view.resize(sceneRect.width() + 100, sceneRect.height() + 100);
     view.setSceneRect(sceneRect);
 
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    view.showMaximized();
+    view.fitInView(scene.sceneRect(), Qt::KeepAspectRatio);
+#else
+    view.show();
+    view.setFocus();
+#endif
+
     LifeCycle cycle(stickMan, &view);
     cycle.setDeathAnimation(":/animations/dead");
 
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    cycle.addActivity(":/animations/jumping", Qt::Key_J, buttonJump, SIGNAL(clicked()));
+    cycle.addActivity(":/animations/dancing", Qt::Key_D, buttonDance, SIGNAL(clicked()));
+    cycle.addActivity(":/animations/chilling", Qt::Key_C, buttonChill, SIGNAL(clicked()));
+#else
     cycle.addActivity(":/animations/jumping", Qt::Key_J);
     cycle.addActivity(":/animations/dancing", Qt::Key_D);
     cycle.addActivity(":/animations/chilling", Qt::Key_C);
+#endif
+
     cycle.start();
 
+
     return app.exec();
 }
index 2fefe72..206321d 100644 (file)
@@ -2,13 +2,15 @@ HEADERS += stickman.h \
            animation.h \
            node.h \
            lifecycle.h \
-           graphicsview.h
+           graphicsview.h \
+           rectbutton.h
 SOURCES += main.cpp \
            stickman.cpp \
            animation.cpp \
            node.cpp \
            lifecycle.cpp \
-           graphicsview.cpp
+           graphicsview.cpp \
+           rectbutton.cpp
 
 RESOURCES += stickman.qrc
 
@@ -22,3 +24,4 @@ symbian {
     TARGET.UID3 = 0xA000E3F9
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index de4ed61..c84ef08 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 QT -= gui
@@ -16,3 +15,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index b3a2e75..a9ca7ca 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 QT -= gui
@@ -16,3 +15,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/complexpingpong
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 8de055a..ae2b7fe 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 CONFIG += qdbus
@@ -19,3 +18,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/chat
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 7a83e88..0ac20ad 100644 (file)
@@ -15,3 +15,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index f633f10..dc9c26e 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 QT -= gui
@@ -16,4 +15,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/listnames
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
-
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 66fc196..9d3f2da 100644 (file)
@@ -16,3 +16,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index afd5f51..f82be77 100644 (file)
@@ -16,3 +16,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/pingpong
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 8bca29c..b7f232f 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 CONFIG += qdbus
@@ -20,3 +19,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/car
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 00a5a2a..5edf1a0 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 CONFIG += qdbus
@@ -21,3 +20,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar/controlle
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 41a7476..eec736d 100644 (file)
@@ -8,3 +8,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dbus/remotecontrolledcar
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 58c7b97..3333578 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/desktop
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index c2c6ead..d86f038 100644 (file)
@@ -9,3 +9,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/desktop/screenshot
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 0952e8f..09cdce2 100644 (file)
@@ -10,3 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/classwizard
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index c6e4748..24544a9 100644 (file)
@@ -14,3 +14,7 @@ INSTALLS += target sources
 symbian: CONFIG += qt_example
 wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
 
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+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)
index f4ea571..5bdac5a 100644 (file)
@@ -17,3 +17,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 108906f..db57fc8 100644 (file)
@@ -9,3 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/extension
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+simulator: warning(This example might not fully work on Simulator platform)
index 313e8e4..2ce0391 100644 (file)
@@ -63,9 +63,6 @@ FindDialog::FindDialog(QWidget *parent)
 //! [0]
     moreButton->setAutoDefault(false);
 
-    buttonBox = new QDialogButtonBox(Qt::Vertical);
-    buttonBox->addButton(findButton, QDialogButtonBox::ActionRole);
-    buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole);
 //! [1]
 
 //! [2]
@@ -77,7 +74,42 @@ FindDialog::FindDialog(QWidget *parent)
 //! [2]
 
 //! [3]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+    // Create menu
+    QMenu *menu = new QMenu(this);
+
+    // Create Find menu item
+    menu->addAction(tr("Find"));
+
+    // Create More menu item
+    QAction *moreAction = menu->addAction(tr("More"));
+    moreAction->setCheckable(true);
+
+    // Create Options CBA
+    QAction *optionAction = new QAction(tr("Options"), this);
+
+    // Set defined menu into Options button
+    optionAction->setMenu(menu);
+    optionAction->setSoftKeyRole(QAction::PositiveSoftKey);
+    addAction(optionAction);
+
+    // Connect More menu item to setVisible slot
+    connect(moreAction, SIGNAL(triggered(bool)), extension, SLOT(setVisible(bool)));
+
+    // Create Exit CBA
+    QAction *backSoftKeyAction = new QAction(QString(tr("Exit")), this);
+    backSoftKeyAction->setSoftKeyRole(QAction::NegativeSoftKey);
+
+    // Exit button closes the application
+    connect(backSoftKeyAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+    addAction(backSoftKeyAction);
+#else
+    buttonBox = new QDialogButtonBox(Qt::Vertical);
+    buttonBox->addButton(findButton, QDialogButtonBox::ActionRole);
+    buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole);
+
     connect(moreButton, SIGNAL(toggled(bool)), extension, SLOT(setVisible(bool)));
+#endif
 
     QVBoxLayout *extensionLayout = new QVBoxLayout;
     extensionLayout->setMargin(0);
@@ -96,13 +128,18 @@ FindDialog::FindDialog(QWidget *parent)
     leftLayout->addLayout(topLeftLayout);
     leftLayout->addWidget(caseCheckBox);
     leftLayout->addWidget(fromStartCheckBox);
-    leftLayout->addStretch(1);
 
     QGridLayout *mainLayout = new QGridLayout;
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
     mainLayout->setSizeConstraint(QLayout::SetFixedSize);
+#endif
     mainLayout->addLayout(leftLayout, 0, 0);
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_SIMULATOR)
     mainLayout->addWidget(buttonBox, 0, 1);
+#endif
     mainLayout->addWidget(extension, 1, 0, 1, 2);
+    mainLayout->setRowStretch(2, 1);
+
     setLayout(mainLayout);
 
     setWindowTitle(tr("Extension"));
index d487faa..9937b6d 100644 (file)
@@ -46,5 +46,12 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     FindDialog dialog;
-    return dialog.exec();
+
+#ifdef Q_OS_SYMBIAN
+    dialog.showMaximized();
+#else
+    dialog.show();
+#endif
+
+    return app.exec();
 }
index ffae120..865fb8e 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/findfiles
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index f2079f5..c5a324a 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#ifdef Q_OS_SYMBIAN
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 3d6c0fd..f700e82 100644 (file)
@@ -44,7 +44,7 @@
 
 //! [0]
 Window::Window(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     browseButton = createButton(tr("&Browse..."), SLOT(browse()));
     findButton = createButton(tr("&Find"), SLOT(find()));
@@ -62,11 +62,8 @@ Window::Window(QWidget *parent)
 //! [0]
 
 //! [1]
-    QHBoxLayout *buttonsLayout = new QHBoxLayout;
-    buttonsLayout->addStretch();
-    buttonsLayout->addWidget(findButton);
-
     QGridLayout *mainLayout = new QGridLayout;
+    mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
     mainLayout->addWidget(fileLabel, 0, 0);
     mainLayout->addWidget(fileComboBox, 0, 1, 1, 2);
     mainLayout->addWidget(textLabel, 1, 0);
@@ -75,12 +72,14 @@ Window::Window(QWidget *parent)
     mainLayout->addWidget(directoryComboBox, 2, 1);
     mainLayout->addWidget(browseButton, 2, 2);
     mainLayout->addWidget(filesTable, 3, 0, 1, 3);
-    mainLayout->addWidget(filesFoundLabel, 4, 0, 1, 3);
-    mainLayout->addLayout(buttonsLayout, 5, 0, 1, 3);
+    mainLayout->addWidget(filesFoundLabel, 4, 0, 1, 2);
+    mainLayout->addWidget(findButton, 4, 2);
     setLayout(mainLayout);
 
     setWindowTitle(tr("Find Files"));
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
     resize(700, 300);
+#endif
 }
 //! [1]
 
@@ -194,7 +193,12 @@ void Window::showFiles(const QStringList &files)
         filesTable->setItem(row, 1, sizeItem);
     }
     filesFoundLabel->setText(tr("%1 file(s) found").arg(files.size()) +
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+                             (" (Select file to open it)"));
+#else
                              (" (Double click on a file to open it)"));
+#endif
+    filesFoundLabel->setWordWrap(true);
 }
 //! [8]
 
@@ -214,6 +218,9 @@ QComboBox *Window::createComboBox(const QString &text)
     comboBox->setEditable(true);
     comboBox->addItem(text);
     comboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    comboBox->setMinimumContentsLength(3);
+#endif
     return comboBox;
 }
 //! [10]
@@ -225,7 +232,7 @@ void Window::createFilesTable()
     filesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
 
     QStringList labels;
-    labels << tr("File Name") << tr("Size");
+    labels << tr("Filename") << tr("Size");
     filesTable->setHorizontalHeaderLabels(labels);
     filesTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
     filesTable->verticalHeader()->hide();
index 73b0652..4dbb446 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef WINDOW_H
 #define WINDOW_H
 
-#include <QDialog>
+#include <QWidget>
 #include <QDir>
 
 QT_BEGIN_NAMESPACE
@@ -53,7 +53,7 @@ class QTableWidgetItem;
 QT_END_NAMESPACE
 
 //! [0]
-class Window : public QDialog
+class Window : public QWidget
 {
     Q_OBJECT
 
index cdf6aa7..4c43e7a 100644 (file)
@@ -10,3 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/licensewizard
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index ffc9693..015aa43 100644 (file)
@@ -11,4 +11,7 @@ INSTALLS += target sources
 symbian: CONFIG += qt_example
 wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
 
-
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+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)
index 0b7728e..a59b3c5 100644 (file)
@@ -49,7 +49,7 @@
                "will activate the detected escape button (if any).")
 
 Dialog::Dialog(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     errorMessageDialog = new QErrorMessage(this);
 
@@ -149,6 +149,7 @@ Dialog::Dialog(QWidget *parent)
     native = new QCheckBox(this);
     native->setText("Use native file dialog.");
     native->setChecked(true);
+
     QGridLayout *layout = new QGridLayout;
     layout->setColumnStretch(1, 1);
     layout->setColumnMinimumWidth(1, 250);
@@ -183,7 +184,19 @@ Dialog::Dialog(QWidget *parent)
     layout->addWidget(errorButton, 14, 0);
     layout->addWidget(errorLabel, 14, 1);
     layout->addWidget(native, 15, 0);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    QWidget *widget = new QWidget;
+    widget->setLayout(layout);
+
+    QScrollArea *scrollArea = new QScrollArea(this);
+    scrollArea->setWidget(widget);
+
+    QHBoxLayout *mainLayout = new QHBoxLayout;
+    mainLayout->addWidget(scrollArea);
+    setLayout(mainLayout);
+#else
     setLayout(layout);
+#endif
 
     setWindowTitle(tr("Standard Dialogs"));
 }
index 9af17d1..506fc00 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef DIALOG_H
 #define DIALOG_H
 
-#include <QDialog>
+#include <QWidget>
 
 QT_BEGIN_NAMESPACE
 class QCheckBox;
@@ -49,7 +49,7 @@ class QLabel;
 class QErrorMessage;
 QT_END_NAMESPACE
 
-class Dialog : public QDialog
+class Dialog : public QWidget
 {
     Q_OBJECT
 
index 2aec376..5dbf2cf 100644 (file)
@@ -56,5 +56,11 @@ int main(int argc, char *argv[])
         app.installTranslator(translator);
 
     Dialog dialog;
-    return dialog.exec();
+#ifdef Q_OS_SYMBIAN
+    dialog.showMaximized();
+#else
+    dialog.show();
+#endif
+
+    return app.exec();
 }
index f7b3cef..e8f63d0 100644 (file)
@@ -11,3 +11,4 @@ INSTALLS += target sources
 symbian: CONFIG += qt_example
 wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
 
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 87265c3..6c83aa0 100644 (file)
@@ -53,5 +53,11 @@ int main(int argc, char *argv[])
         fileName = ".";
 
     TabDialog tabdialog(fileName);
-    return tabdialog.exec();
+#ifdef Q_OS_SYMBIAN
+    tabdialog.showMaximized();
+#else
+    tabdialog.show();
+#endif
+
+    return app.exec();
 }
index 62c921c..5d4d345 100644 (file)
@@ -65,6 +65,7 @@ TabDialog::TabDialog(const QString &fileName, QWidget *parent)
 
 //! [4]
     QVBoxLayout *mainLayout = new QVBoxLayout;
+    mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
     mainLayout->addWidget(tabWidget);
     mainLayout->addWidget(buttonBox);
     setLayout(mainLayout);
index c67fcbd..0486db9 100644 (file)
@@ -10,3 +10,6 @@ INSTALLS += target sources
 
 symbian: CONFIG += qt_example
 wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib ws2.lib
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
index 2a5c0ae..3dbc039 100644 (file)
@@ -128,7 +128,11 @@ int main(int argc, char *argv[])
     wizard.addPage(createConclusionPage());
 
     wizard.setWindowTitle("Trivial Wizard");
+#ifdef Q_OS_SYMBIAN
+    wizard.showMaximized();
+#else
     wizard.show();
+#endif
 
     return app.exec();
 }
index 31422de..0321ac8 100644 (file)
@@ -7,3 +7,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/dialogs/trivialwizard
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index db56b7c..691c270 100644 (file)
@@ -13,3 +13,4 @@ symbian {
     TARGET.UID3 = 0xA000C615
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index c8c3b13..46bfff9 100644 (file)
 DragWidget::DragWidget(QWidget *parent)
     : QFrame(parent)
 {
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+#else
     setMinimumSize(200, 200);
+#endif
     setFrameStyle(QFrame::Sunken | QFrame::StyledPanel);
     setAcceptDrops(true);
 
     QLabel *boatIcon = new QLabel(this);
     boatIcon->setPixmap(QPixmap(":/images/boat.png"));
-    boatIcon->move(20, 20);
+    boatIcon->move(10, 10);
     boatIcon->show();
     boatIcon->setAttribute(Qt::WA_DeleteOnClose);
 
     QLabel *carIcon = new QLabel(this);
     carIcon->setPixmap(QPixmap(":/images/car.png"));
-    carIcon->move(120, 20);
+    carIcon->move(100, 10);
     carIcon->show();
     carIcon->setAttribute(Qt::WA_DeleteOnClose);
 
     QLabel *houseIcon = new QLabel(this);
     houseIcon->setPixmap(QPixmap(":/images/house.png"));
-    houseIcon->move(20, 120);
+    houseIcon->move(10, 80);
     houseIcon->show();
     houseIcon->setAttribute(Qt::WA_DeleteOnClose);
 }
index 7a80b92..a6ade67 100644 (file)
@@ -55,7 +55,11 @@ int main(int argc, char *argv[])
 
     mainWidget.setLayout(horizontalLayout);
     mainWidget.setWindowTitle(QObject::tr("Draggable Icons"));
+#ifdef Q_OS_SYMBIAN
+    mainWidget.showMaximized();
+#else
     mainWidget.show();
+#endif
 
     return app.exec();
 }
index ffe219b..33885f9 100644 (file)
@@ -15,3 +15,5 @@ symbian {
     TARGET.UID3 = 0xA000CF64
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index df61c39..060d41d 100644 (file)
@@ -62,16 +62,18 @@ DragWidget::DragWidget(QWidget *parent)
             wordLabel->show();
             wordLabel->setAttribute(Qt::WA_DeleteOnClose);
             x += wordLabel->width() + 2;
-            if (x >= 195) {
+            if (x >= 245) {
                 x = 5;
                 y += wordLabel->height() + 2;
             }
         }
     }
 
+    /*
     QPalette newPalette = palette();
     newPalette.setColor(QPalette::Window, Qt::white);
     setPalette(newPalette);
+    */
 
     setAcceptDrops(true);
     setMinimumSize(400, qMax(200, y));
index 4d0a121..0ae794b 100644 (file)
@@ -47,6 +47,10 @@ int main(int argc, char *argv[])
 
     QApplication app(argc, argv);
     DragWidget window;
+#ifdef Q_OS_SYMBIAN
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 0ee9f60..b3be1b6 100644 (file)
@@ -11,3 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/draganddrop/dropsite
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index aeab3ad..19abfb6 100644 (file)
@@ -65,7 +65,11 @@ DragWidget::DragWidget(QWidget *parent)
             wordLabel->show();
             wordLabel->setAttribute(Qt::WA_DeleteOnClose);
             x += wordLabel->width() + 2;
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+            if (x >= 345) {
+#else
             if (x >= 245) {
+#endif
                 x = 5;
                 y += wordLabel->height() + 2;
             }
index fe1377f..5fb7379 100644 (file)
@@ -16,4 +16,4 @@ symbian {
     CONFIG += qt_example
 }
 
-
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 1166abb..623e6d2 100644 (file)
@@ -51,10 +51,15 @@ int main(int argc, char *argv[])
 #endif
     DragWidget window;
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    window.showMaximized();
+#else
     bool smallScreen = QApplication::arguments().contains("-small-screen");
     if (smallScreen)
         window.showFullScreen();
     else
         window.show();
+#endif
+
     return app.exec();
 }
index 6034194..b432ddc 100644 (file)
@@ -49,6 +49,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     MainWindow window;
     window.openImage(":/images/example.jpg");
+#ifdef Q_OS_SYMBIAN
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index ea7cff1..09fcaf7 100644 (file)
@@ -90,14 +90,15 @@ void MainWindow::setupPuzzle()
 {
     int size = qMin(puzzleImage.width(), puzzleImage.height());
     puzzleImage = puzzleImage.copy((puzzleImage.width() - size)/2,
-        (puzzleImage.height() - size)/2, size, size).scaled(400,
-            400, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+        (puzzleImage.height() - size)/2, size, size).scaled(puzzleWidget->width(),
+            puzzleWidget->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
 
     piecesList->clear();
 
     for (int y = 0; y < 5; ++y) {
         for (int x = 0; x < 5; ++x) {
-            QPixmap pieceImage = puzzleImage.copy(x*80, y*80, 80, 80);
+            int pieceSize = puzzleWidget->pieceSize();
+            QPixmap pieceImage = puzzleImage.copy(x * pieceSize, y * pieceSize, pieceSize, pieceSize);
             piecesList->addPiece(pieceImage, QPoint(x, y));
         }
     }
@@ -137,9 +138,14 @@ void MainWindow::setupWidgets()
 {
     QFrame *frame = new QFrame;
     QHBoxLayout *frameLayout = new QHBoxLayout(frame);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+    puzzleWidget = new PuzzleWidget(260);
+#else
+    puzzleWidget = new PuzzleWidget(400);
+#endif
+
+    piecesList = new PiecesList(puzzleWidget->pieceSize(), this);
 
-    piecesList = new PiecesList;
-    puzzleWidget = new PuzzleWidget;
 
     connect(puzzleWidget, SIGNAL(puzzleCompleted()),
             this, SLOT(setCompleted()), Qt::QueuedConnection);
index db27e7a..5eb4984 100644 (file)
 
 #include "pieceslist.h"
 
-PiecesList::PiecesList(QWidget *parent)
-    : QListWidget(parent)
+PiecesList::PiecesList(int pieceSize, QWidget *parent)
+    : QListWidget(parent), m_PieceSize(pieceSize)
 {
     setDragEnabled(true);
     setViewMode(QListView::IconMode);
-    setIconSize(QSize(60, 60));
+    setIconSize(QSize(m_PieceSize, m_PieceSize));
     setSpacing(10);
     setAcceptDrops(true);
     setDropIndicatorShown(true);
index 2068dce..967ade0 100644 (file)
@@ -48,7 +48,7 @@ class PiecesList : public QListWidget
     Q_OBJECT
 
 public:
-    PiecesList(QWidget *parent = 0);
+    PiecesList(int pieceSize, QWidget *parent = 0);
     void addPiece(QPixmap pixmap, QPoint location);
 
 protected:
@@ -56,6 +56,8 @@ protected:
     void dragMoveEvent(QDragMoveEvent *event);
     void dropEvent(QDropEvent *event);
     void startDrag(Qt::DropActions supportedActions);
+
+    int m_PieceSize;
 };
 
 #endif
index 0d3a5da..2682032 100644 (file)
@@ -27,3 +27,4 @@ wince*: {
    addFile.path = .
    DEPLOYMENT += addFile
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 355c6d5..e83f248 100644 (file)
 
 #include "puzzlewidget.h"
 
-PuzzleWidget::PuzzleWidget(QWidget *parent)
-    : QWidget(parent)
+PuzzleWidget::PuzzleWidget(int imageSize, QWidget *parent)
+    : QWidget(parent), m_ImageSize(imageSize)
 {
     setAcceptDrops(true);
-    setMinimumSize(400, 400);
-    setMaximumSize(400, 400);
+    setMinimumSize(m_ImageSize, m_ImageSize);
+    setMaximumSize(m_ImageSize, m_ImageSize);
 }
 
 void PuzzleWidget::clear()
@@ -116,7 +116,7 @@ void PuzzleWidget::dropEvent(QDropEvent *event)
         event->setDropAction(Qt::MoveAction);
         event->accept();
 
-        if (location == QPoint(square.x()/80, square.y()/80)) {
+        if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize())) {
             inPlace++;
             if (inPlace == 25)
                 emit puzzleCompleted();
@@ -151,7 +151,7 @@ void PuzzleWidget::mousePressEvent(QMouseEvent *event)
     piecePixmaps.removeAt(found);
     pieceRects.removeAt(found);
 
-    if (location == QPoint(square.x()/80, square.y()/80))
+    if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize()))
         inPlace--;
 
     update(square);
@@ -175,7 +175,7 @@ void PuzzleWidget::mousePressEvent(QMouseEvent *event)
         pieceRects.insert(found, square);
         update(targetSquare(event->pos()));
 
-        if (location == QPoint(square.x()/80, square.y()/80))
+        if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize()))
             inPlace++;
     }
 }
@@ -200,5 +200,15 @@ void PuzzleWidget::paintEvent(QPaintEvent *event)
 
 const QRect PuzzleWidget::targetSquare(const QPoint &position) const
 {
-    return QRect(position.x()/80 * 80, position.y()/80 * 80, 80, 80);
+    return QRect(position.x()/pieceSize() * pieceSize(), position.y()/pieceSize() * pieceSize(), pieceSize(), pieceSize());
+}
+
+int PuzzleWidget::pieceSize() const
+{
+    return m_ImageSize / 5;
+}
+
+int PuzzleWidget::imageSize() const
+{
+    return m_ImageSize;
 }
index e0356b4..2cc789c 100644 (file)
@@ -57,9 +57,12 @@ class PuzzleWidget : public QWidget
     Q_OBJECT
 
 public:
-    PuzzleWidget(QWidget *parent = 0);
+    PuzzleWidget(int imageSize, QWidget *parent = 0);
     void clear();
 
+    int pieceSize() const;
+    int imageSize() const;
+
 signals:
     void puzzleCompleted();
 
@@ -80,6 +83,7 @@ private:
     QList<QPoint> pieceLocations;
     QRect highlightedRect;
     int inPlace;
+    int m_ImageSize;
 };
 
 #endif
index 26e53aa..362ec43 100644 (file)
@@ -131,8 +131,34 @@ void BlurPicker::keyPressEvent(QKeyEvent *event)
         break;
     }
     if (m_animation.state() == QAbstractAnimation::Stopped && delta) {
-            m_animation.setEndValue(m_index + delta);
-            m_animation.start();
-            event->accept();
+        m_animation.setEndValue(m_index + delta);
+        m_animation.start();
+        event->accept();
+    }
+}
+
+void BlurPicker::resizeEvent(QResizeEvent */*event*/)
+{
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    fitInView(sceneRect(), Qt::KeepAspectRatio);
+#endif
+}
+
+void BlurPicker::mousePressEvent(QMouseEvent *event)
+{
+    int delta = 0;
+    if(event->x() > (width() / 2))
+    {
+        delta = 1;
+    }
+    else
+    {
+        delta = -1;
+    }
+
+    if (m_animation.state() == QAbstractAnimation::Stopped && delta) {
+        m_animation.setEndValue(m_index + delta);
+        m_animation.start();
+        event->accept();
     }
 }
index fa5743c..af367b9 100644 (file)
@@ -60,6 +60,8 @@ public:
 
 protected:
     void keyPressEvent(QKeyEvent *event);
+    void resizeEvent(QResizeEvent *event);
+    void mousePressEvent(QMouseEvent *event);
 
 private:
     void setupScene();
index ba65da8..2dfa8b7 100644 (file)
@@ -7,3 +7,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/blurpicker
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS blurpicker.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/blurpicker
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index e95b7e0..5138fcc 100644 (file)
@@ -47,8 +47,13 @@ int main(int argc, char **argv)
 
     BlurPicker blurPicker;
     blurPicker.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Application Picker"));
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    blurPicker.showMaximized();
+#else
     blurPicker.setFixedSize(400, 300);
     blurPicker.show();
+#endif
 
     return app.exec();
 }
index 88f9f89..158f049 100644 (file)
@@ -56,7 +56,6 @@ FadeMessage::FadeMessage(QWidget *parent): QGraphicsView(parent)
     m_animation->setStartValue(0);
     m_animation->setEndValue(1);
 
-
     setRenderHint(QPainter::Antialiasing, true);
     setFrameStyle(QFrame::NoFrame);
 }
@@ -75,7 +74,7 @@ void FadeMessage::togglePopup()
 
 void FadeMessage::setupScene()
 {
-    QGraphicsRectItem *parent = m_scene.addRect(0, 0, 400, 600);
+    QGraphicsRectItem *parent = m_scene.addRect(0, 0, 800, 600);
     parent->setPen(Qt::NoPen);
     parent->setZValue(0);
 
@@ -85,7 +84,7 @@ void FadeMessage::setupScene()
 
     for (int i = 1; i < 5; ++i)
         for (int j = 2; j < 5; ++j) {
-            QGraphicsRectItem *item = m_scene.addRect(i * 50, j * 50, 38, 38);
+            QGraphicsRectItem *item = m_scene.addRect(i * 50, (j - 1) * 50, 38, 38);
             item->setParentItem(parent);
             item->setZValue(1);
             int hue = 12 * (i * 5 + j);
@@ -124,6 +123,10 @@ void FadeMessage::setupScene()
     press->setText(tr("Press me"));
     connect(press, SIGNAL(clicked()), SLOT(togglePopup()));
     m_scene.addWidget(press);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    press->move(200, 210);
+#else
     press->move(300, 500);
+#endif
 }
-
index 9cff9a1..b46ac0e 100644 (file)
@@ -12,5 +12,7 @@ sources.files = $$SOURCES \
     fademessage.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/fademessage
 
-DEPLOYMENT_PLUGIN += qjpeg
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
 
+simulator: warning(This example might not fully work on Simulator platform)
index 83d6d8e..8c72a45 100644 (file)
@@ -48,8 +48,12 @@ int main(int argc, char **argv)
 
     FadeMessage widget;
     widget.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Popup Message with Effect"));
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    widget.showMaximized();
+#else
     widget.setFixedSize(400, 600);
     widget.show();
+#endif
 
     return app.exec();
 }
index a988ffb..bd23a2d 100644 (file)
@@ -134,3 +134,9 @@ void Lighting::animate()
     m_scene.update();
 }
 
+void Lighting::resizeEvent(QResizeEvent */*event*/)
+{
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    fitInView(sceneRect(), Qt::KeepAspectRatio);
+#endif
+}
index 6a6bc56..5099653 100644 (file)
@@ -57,6 +57,9 @@ private slots:
 private:
     void setupScene();
 
+protected:
+    void resizeEvent(QResizeEvent *event);
+
 private:
     qreal angle;
     QGraphicsScene m_scene;
index fd22886..e79a407 100644 (file)
@@ -6,3 +6,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/lighting
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS lighting.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/lighting
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index c75d841..fff3d73 100644 (file)
@@ -47,8 +47,13 @@ int main(int argc, char **argv)
 
     Lighting lighting;
     lighting.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Lighting and Shadows"));
+
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    lighting.showMaximized();
+#else
     lighting.resize(640, 480);
     lighting.show();
+#endif
 
     return app.exec();
 }
index 0680ff4..9da2085 100644 (file)
@@ -62,3 +62,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 2e75f06..4c334cf 100644 (file)
@@ -19,3 +19,7 @@ symbian {
     TARGET.UID3 = 0xA000D7D0
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+symbian: warning(This example does not work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example does not work on Simulator platform)
index 52cb13b..eb83890 100644 (file)
@@ -7,3 +7,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/anchorlayout
 INSTALLS += target sources
 
 TARGET = anchorlayout
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index c31afd2..dbe9f19 100644 (file)
@@ -122,7 +122,12 @@ int main(int argc, char **argv)
     scene.addItem(w);
     scene.setBackgroundBrush(Qt::darkGreen);
     QGraphicsView view(&scene);
+
+#if defined(Q_WS_S60)
+    view.showMaximized();
+#else
     view.show();
+#endif
 
     return app.exec();
 }
index 8b66738..7d0ed4a 100644 (file)
@@ -15,3 +15,5 @@ symbian {
     TARGET.UID3 = 0xA000A645
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index 57448a5..11da183 100644 (file)
@@ -51,8 +51,12 @@ int main(int argc, char **argv)
     Window *window = new Window;
     scene.addItem(window);
     QGraphicsView view(&scene);
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    view.showMaximized();
+#else
     view.resize(600, 600);
     view.show();
+#endif
 
     return app.exec();
 }
index b49f44b..ea2b0d7 100644 (file)
@@ -17,3 +17,5 @@ symbian {
     TARGET.UID3 = 0xA000A643
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index 2970a00..4359402 100644 (file)
@@ -79,8 +79,12 @@ int main(int argc, char **argv)
     view.setDragMode(QGraphicsView::ScrollHandDrag);
 //! [5] //! [6]
     view.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Colliding Mice"));
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    view.showMaximized();
+#else
     view.resize(400, 300);
     view.show();
+#endif
 
     QTimer timer;
     QObject::connect(&timer, SIGNAL(timeout()), &scene, SLOT(advance()));
index 6af1160..0703365 100644 (file)
@@ -19,4 +19,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/diagramscene
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 5240b42..0fe241d 100644 (file)
@@ -18,3 +18,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/dragdroprobot
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example might not fully work on Simulator platform)
index 315d2b6..c8b84ec 100644 (file)
 
 #include <math.h>
 
+class GraphicsView : public QGraphicsView
+{
+public:
+    GraphicsView(QGraphicsScene *scene) : QGraphicsView(scene)
+    {
+    }
+
+protected:
+    virtual void resizeEvent(QResizeEvent *event)
+    {
+#if defined(Q_OS_SYMBIAN)
+        fitInView(sceneRect(), Qt::KeepAspectRatio);
+#endif
+    }
+};
+
 //! [0]
 int main(int argc, char **argv)
 {
@@ -69,12 +85,16 @@ int main(int argc, char **argv)
     scene.addItem(robot);
 //! [1]
 //! [2]
-    QGraphicsView view(&scene);
+    GraphicsView view(&scene);
     view.setRenderHint(QPainter::Antialiasing);
     view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
     view.setBackgroundBrush(QColor(230, 200, 167));
     view.setWindowTitle("Drag and Drop Robot");
-    view.show();
+#if defined(Q_OS_SYMBIAN)
+    view.showMaximized();
+#else
+     view.show();
+#endif
 
     return app.exec();
 }
index 2b5cae5..652ab73 100644 (file)
@@ -144,6 +144,6 @@ void Edge::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
 
     painter->setBrush(Qt::black);
     painter->drawPolygon(QPolygonF() << line.p1() << sourceArrowP1 << sourceArrowP2);
-    painter->drawPolygon(QPolygonF() << line.p2() << destArrowP1 << destArrowP2);        
+    painter->drawPolygon(QPolygonF() << line.p2() << destArrowP1 << destArrowP2);
 }
 //! [6]
index 208c849..7a58dd1 100644 (file)
@@ -21,3 +21,6 @@ symbian {
     TARGET.UID3 = 0xA000A642
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index c875b65..f6bf05d 100644 (file)
@@ -132,17 +132,14 @@ void GraphWidget::keyPressEvent(QKeyEvent *event)
         centerNode->moveBy(20, 0);
         break;
     case Qt::Key_Plus:
-        scaleView(qreal(1.2));
+        zoomIn();
         break;
     case Qt::Key_Minus:
-        scaleView(1 / qreal(1.2));
+        zoomOut();
         break;
     case Qt::Key_Space:
     case Qt::Key_Enter:
-        foreach (QGraphicsItem *item, scene()->items()) {
-            if (qgraphicsitem_cast<Node *>(item))
-                item->setPos(-150 + qrand() % 300, -150 + qrand() % 300);
-        }
+        shuffle();
         break;
     default:
         QGraphicsView::keyPressEvent(event);
@@ -206,6 +203,7 @@ void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect)
     painter->setBrush(Qt::NoBrush);
     painter->drawRect(sceneRect);
 
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
     // Text
     QRectF textRect(sceneRect.left() + 4, sceneRect.top() + 4,
                     sceneRect.width() - 4, sceneRect.height() - 4);
@@ -220,6 +218,7 @@ void GraphWidget::drawBackground(QPainter *painter, const QRectF &rect)
     painter->drawText(textRect.translated(2, 2), message);
     painter->setPen(Qt::black);
     painter->drawText(textRect, message);
+#endif
 }
 //! [6]
 
@@ -233,3 +232,21 @@ void GraphWidget::scaleView(qreal scaleFactor)
     scale(scaleFactor, scaleFactor);
 }
 //! [7]
+
+void GraphWidget::shuffle()
+{
+    foreach (QGraphicsItem *item, scene()->items()) {
+        if (qgraphicsitem_cast<Node *>(item))
+            item->setPos(-150 + qrand() % 300, -150 + qrand() % 300);
+    }
+}
+
+void GraphWidget::zoomIn()
+{
+    scaleView(qreal(1.2));
+}
+
+void GraphWidget::zoomOut()
+{
+    scaleView(1 / qreal(1.2));
+}
index 764bb3f..524ef67 100644 (file)
@@ -55,6 +55,11 @@ public:
 
     void itemMoved();
 
+public slots:
+    void shuffle();
+    void zoomIn();
+    void zoomOut();
+
 protected:
     void keyPressEvent(QKeyEvent *event);
     void timerEvent(QTimerEvent *event);
index ab7e7cf..d653da5 100644 (file)
@@ -47,7 +47,18 @@ int main(int argc, char **argv)
     QApplication app(argc, argv);
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
 
-    GraphWidget widget;
-    widget.show();
+    GraphWidget *widget = new GraphWidget;
+
+    QMainWindow mainWindow;
+    mainWindow.setCentralWidget(widget);
+
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+    mainWindow.menuBar()->addAction("Shuffle", widget, SLOT(shuffle()));
+    mainWindow.menuBar()->addAction("Zoom In", widget, SLOT(zoomIn()));
+    mainWindow.menuBar()->addAction("Zoom Out", widget, SLOT(zoomOut()));
+    mainWindow.showMaximized();
+#else
+    mainWindow.show();
+#endif
     return app.exec();
 }
index 8d1dadd..b345f83 100644 (file)
@@ -141,9 +141,16 @@ bool Node::advance()
 //! [8]
 QRectF Node::boundingRect() const
 {
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+    // Add some extra space around the circle for easier touching with finger
+    qreal adjust = 30;
+    return QRectF( -10 - adjust, -10 - adjust,
+                  20 + adjust * 2, 20 + adjust * 2);
+#else
     qreal adjust = 2;
-    return QRectF(-10 - adjust, -10 - adjust,
+    return QRectF( -10 - adjust, -10 - adjust,
                   23 + adjust, 23 + adjust);
+#endif
 }
 //! [8]
 
@@ -151,7 +158,12 @@ QRectF Node::boundingRect() const
 QPainterPath Node::shape() const
 {
     QPainterPath path;
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+    // Add some extra space around the circle for easier touching with finger
+    path.addEllipse( -40, -40, 80, 80);
+#else
     path.addEllipse(-10, -10, 20, 20);
+#endif
     return path;
 }
 //! [9]
@@ -174,6 +186,7 @@ void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
         gradient.setColorAt(1, Qt::darkYellow);
     }
     painter->setBrush(gradient);
+
     painter->setPen(QPen(Qt::black, 0));
     painter->drawEllipse(-10, -10, 20, 20);
 }
index ce35367..8a97d2d 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -8,3 +7,7 @@ QMAKE_PROJECT_NAME = flowlayout_graphicsview
 # Input
 HEADERS += flowlayout.h window.h
 SOURCES += flowlayout.cpp main.cpp window.cpp
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index cee08d7..cc5eeb6 100644 (file)
@@ -49,7 +49,13 @@ int main(int argc, char **argv)
     QGraphicsView *view = new QGraphicsView(&scene);
     Window *w = new Window;
     scene.addItem(w);
+
+#if defined(Q_OS_SYMBIAN)
+    view->showMaximized();
+#else
     view->resize(400, 300);
     view->show();
+#endif
+
     return app.exec();
 }
index a1458de..d1b0e86 100644 (file)
@@ -22,3 +22,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 8f4a681..d7d2f56 100644 (file)
@@ -49,8 +49,11 @@ int main(int argc, char *argv[])
     Q_INIT_RESOURCE(padnavigator);
 
     PadNavigator navigator(QSize(3, 3));
+#if defined(Q_OS_SYMBIAN)
+    navigator.showMaximized();
+#else
     navigator.show();
-
+#endif
     return app.exec();
 }
 //! [0]
index 45ebfdc..a51571f 100644 (file)
@@ -30,3 +30,6 @@ symbian {
     TARGET.UID3 = 0xA000A644
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index 4fa837f..cba37d9 100644 (file)
@@ -126,8 +126,15 @@ int main(int argc, char *argv[])
     QGraphicsView *view = new QGraphicsView();
     view->setScene(scene);
     view->setWindowTitle(QApplication::translate("simpleanchorlayout", "Simple Anchor Layout"));
+
+#if defined(Q_OS_SYMBIAN)
+    view->showMaximized();
+#elif defined(Q_WS_MAEMO_5)
+    view-show();
+#else
     view->resize(360, 320);
     view->show();
+#endif
 
     return app.exec();
 }
index f85ad8f..6ba525e 100644 (file)
@@ -7,3 +7,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/simpleanchorlayout
 INSTALLS += target sources
 
 TARGET = simpleanchorlayout
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index 67596ac..b1f2c72 100644 (file)
 #include <QGraphicsSceneResizeEvent>
 
 
+class GraphicsView : public QGraphicsView
+{
+public:
+    GraphicsView(QGraphicsScene *scene, QGraphicsWidget *widget) : QGraphicsView(scene), w(widget)
+    {
+    }
+
+    virtual void resizeEvent(QResizeEvent *event)
+    {
+        w->setGeometry(0, 0, event->size().width(), event->size().height());
+    }
+
+    QGraphicsWidget *w;
+};
+
 class PixmapWidget : public QGraphicsLayoutItem
 {
 
@@ -175,7 +190,10 @@ int main(int argc, char **argv)
     QApplication app(argc, argv);
 
     QGraphicsScene scene;
+#if defined(Q_OS_SYMBIAN)
+#else
     scene.setSceneRect(0, 0, 800, 480);
+#endif
 
     // pixmaps widgets
     PixmapWidget *title = new PixmapWidget(QPixmap(":/images/title.jpg"));
@@ -250,8 +268,13 @@ int main(int argc, char **argv)
     // QGV setup
     scene.addItem(w);
     scene.setBackgroundBrush(Qt::white);
+#if defined(Q_OS_SYMBIAN)
+    GraphicsView *view = new GraphicsView(&scene, w);
+    view->showMaximized();
+#else
     QGraphicsView *view = new QGraphicsView(&scene);
     view->show();
+#endif
 
     return app.exec();
 }
index 57e154e..f07b7df 100644 (file)
@@ -12,3 +12,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES weatheranchorlayout.pro images
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/weatheranchorlayout
 INSTALLS += target sources
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index ed20b26..a9dd9c1 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index c8c3fe4..86cc0cc 100644 (file)
 #include "client.h"
 
 Client::Client(QWidget *parent)
+#ifdef Q_WS_MAEMO_5
+    : QWidget(parent)
+#else
     : QDialog(parent)
+#endif
 {
     hostLabel = new QLabel(tr("&Server name:"));
     hostLineEdit = new QLineEdit("fortune");
@@ -53,6 +57,7 @@ Client::Client(QWidget *parent)
 
     statusLabel = new QLabel(tr("This examples requires that you run the "
                                 "Fortune Server example as well."));
+    statusLabel->setWordWrap(true);
 
     getFortuneButton = new QPushButton(tr("Get Fortune"));
     getFortuneButton->setDefault(true);
index d23db9e..b0f0e36 100644 (file)
 #ifndef CLIENT_H
 #define CLIENT_H
 
+#ifdef Q_WS_MAEMO_5
+#include <QWidget>
+#else
 #include <QDialog>
+#endif
+
 #include <qlocalsocket.h>
 
 QT_BEGIN_NAMESPACE
@@ -52,7 +57,11 @@ class QPushButton;
 class QLocalSocket;
 QT_END_NAMESPACE
 
+#ifdef Q_WS_MAEMO_5
+class Client : public QWidget
+#else
 class Client : public QDialog
+#endif
 {
     Q_OBJECT
 
index a66d4b2..ea1d595 100644 (file)
@@ -10,5 +10,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneclient
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
 
-
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
index 19464d1..8e6feeb 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Client client;
+#if defined(Q_WS_S60)
+    client.showMaximized();
+#else
     client.show();
-    return client.exec();
+#endif
+    return app.exec();
 }
index ae09d80..55857cf 100644 (file)
@@ -10,5 +10,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/localfortuneserver
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
 
-
+simulator: warning(This example might not fully work on Simulator platform)
index 6c0e9ee..fc0c698 100644 (file)
@@ -49,7 +49,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Server server;
+#if defined(Q_WS_S60)
+    server.showMaximized();
+#else
     server.show();
+#endif
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
-    return server.exec();
+    return app.exec();
 }
index 88784d4..08dd31d 100644 (file)
 #include <qlocalsocket.h>
 
 Server::Server(QWidget *parent)
+#ifdef Q_WS_MAEMO_5
+    : QWidget(parent)
+#else
     : QDialog(parent)
+#endif
 {
     statusLabel = new QLabel;
+    statusLabel->setWordWrap(true);
     quitButton = new QPushButton(tr("Quit"));
     quitButton->setAutoDefault(false);
 
index 5f00ba4..313862c 100644 (file)
 #ifndef SERVER_H
 #define SERVER_H
 
+#ifdef Q_WS_MAEMO_5
+#include <QWidget>
+#else
 #include <QDialog>
+#endif
 
 QT_BEGIN_NAMESPACE
 class QLabel;
@@ -49,7 +53,11 @@ class QPushButton;
 class QLocalServer;
 QT_END_NAMESPACE
 
+#ifdef Q_WS_MAEMO_5
+class Server : public QWidget
+#else
 class Server : public QDialog
+#endif
 {
     Q_OBJECT
 
index 252fb29..9202cb7 100644 (file)
@@ -13,3 +13,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/ipc/sharedmemory
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example does not work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example does not work on Simulator platform)
index 21a9f32..855d4b1 100644 (file)
@@ -20,3 +20,5 @@ symbian {
     TARGET.UID3 = 0xA000A646
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 455b275..76efb01 100644 (file)
@@ -46,7 +46,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     MainWindow mw;
+#if defined(Q_OS_SYMBIAN)
+    mw.showMaximized();
+#else
     mw.show();
+#endif
     return app.exec();
 }
 //! [0]
index da06113..9bc0e93 100644 (file)
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/basicsortfiltermodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 84cfd05..750a19e 100644 (file)
@@ -88,6 +88,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     Window window;
     window.setSourceModel(createMailModel(&window));
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index f35c1e1..f95c9cc 100644 (file)
@@ -47,9 +47,6 @@ Window::Window()
     proxyModel = new QSortFilterProxyModel;
     proxyModel->setDynamicSortFilter(true);
 
-    sourceGroupBox = new QGroupBox(tr("Original Model"));
-    proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
-
     sourceView = new QTreeView;
     sourceView->setRootIsDecorated(false);
     sourceView->setAlternatingRowColors(true);
@@ -92,6 +89,41 @@ Window::Window()
     connect(sortCaseSensitivityCheckBox, SIGNAL(toggled(bool)),
             this, SLOT(sortChanged()));
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    sourceWidget = new QWidget;
+    filterWidget = new QWidget;
+    proxyWidget = new QWidget;
+
+    QHBoxLayout *sourceLayout = new QHBoxLayout;
+    sourceLayout->addWidget(sourceView);
+    sourceWidget->setLayout(sourceLayout);
+
+    QGridLayout *filterLayout = new QGridLayout;
+    filterLayout->addWidget(filterPatternLabel, 1, 0);
+    filterLayout->addWidget(filterPatternLineEdit, 1, 1, 1, 2);
+    filterLayout->addWidget(filterSyntaxLabel, 2, 0);
+    filterLayout->addWidget(filterSyntaxComboBox, 2, 1, 1, 2);
+    filterLayout->addWidget(filterColumnLabel, 3, 0);
+    filterLayout->addWidget(filterColumnComboBox, 3, 1, 1, 2);
+    filterLayout->addWidget(filterCaseSensitivityCheckBox, 4, 0, 1, 2);
+    filterLayout->addWidget(sortCaseSensitivityCheckBox, 4, 2);
+    filterWidget->setLayout(filterLayout);
+
+    QHBoxLayout *proxyLayout = new QHBoxLayout;
+    proxyLayout->addWidget(proxyView);
+    proxyWidget->setLayout(proxyLayout);
+
+    QVBoxLayout *mainLayout = new QVBoxLayout;
+
+    QTabWidget *tabWidget = new QTabWidget;
+    tabWidget->addTab(sourceWidget, "Source");
+    tabWidget->addTab(filterWidget, "Filters");
+    tabWidget->addTab(proxyWidget, "Proxy");
+    mainLayout->addWidget(tabWidget);
+#else
+    sourceGroupBox = new QGroupBox(tr("Original Model"));
+    proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
+
     QHBoxLayout *sourceLayout = new QHBoxLayout;
     sourceLayout->addWidget(sourceView);
     sourceGroupBox->setLayout(sourceLayout);
@@ -109,8 +141,11 @@ Window::Window()
     proxyGroupBox->setLayout(proxyLayout);
 
     QVBoxLayout *mainLayout = new QVBoxLayout;
+
     mainLayout->addWidget(sourceGroupBox);
     mainLayout->addWidget(proxyGroupBox);
+#endif
+
     setLayout(mainLayout);
 
     setWindowTitle(tr("Basic Sort/Filter Model"));
index 92b5008..fbdffc3 100644 (file)
@@ -71,8 +71,14 @@ private slots:
 private:
     QSortFilterProxyModel *proxyModel;
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    QWidget *sourceWidget;
+    QWidget *filterWidget;
+    QWidget *proxyWidget;
+#else
     QGroupBox *sourceGroupBox;
     QGroupBox *proxyGroupBox;
+#endif
     QTreeView *sourceView;
     QTreeView *proxyView;
     QCheckBox *filterCaseSensitivityCheckBox;
index 3da23d4..6716f90 100644 (file)
@@ -18,3 +18,5 @@ symbian {
     TARGET.UID3 = 0xA000A647
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 9366540..52d8f28 100644 (file)
@@ -48,6 +48,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();
 }
index 3147375..2b150b4 100644 (file)
@@ -11,3 +11,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/coloreditorfactory
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index aa46cc5..8b7eff4 100644 (file)
@@ -47,7 +47,11 @@ int main(int argv, char **args)
     QApplication app(argv, args);
 
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
 
     return app.exec();
 }
index 5a0d562..d02773a 100644 (file)
@@ -7,3 +7,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/combowidgetmapper
 sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/combowidgetmapper
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 41e756d..9e45ede 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char **argv)
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index e04c5df..40cc223 100644 (file)
@@ -12,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/customsortfiltermodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index b35b847..4154dbf 100644 (file)
@@ -89,7 +89,11 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     Window window;
     window.setSourceModel(createMailModel(&window));
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
 //! [0]
index 555e854..51fdcb7 100644 (file)
@@ -48,22 +48,27 @@ Window::Window()
 {
     proxyModel = new MySortFilterProxyModel(this);
     proxyModel->setDynamicSortFilter(true);
-//! [0]
+    //! [0]
 
-//! [1]
+    //! [1]
     sourceView = new QTreeView;
     sourceView->setRootIsDecorated(false);
     sourceView->setAlternatingRowColors(true);
-//! [1]
+    //! [1]
 
     QHBoxLayout *sourceLayout = new QHBoxLayout;
-//! [2]
+    //! [2]
     sourceLayout->addWidget(sourceView);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    sourceWidget = new QWidget;
+    sourceWidget->setLayout(sourceLayout);
+#else
     sourceGroupBox = new QGroupBox(tr("Original Model"));
     sourceGroupBox->setLayout(sourceLayout);
-//! [2]
+#endif
+    //! [2]
 
-//! [3]
+    //! [3]
     filterCaseSensitivityCheckBox = new QCheckBox(tr("Case sensitive filter"));
     filterCaseSensitivityCheckBox->setChecked(true);
 
@@ -97,11 +102,11 @@ Window::Window()
     connect(fromDateEdit, SIGNAL(dateChanged(QDate)),
             this, SLOT(dateFilterChanged()));
     connect(toDateEdit, SIGNAL(dateChanged(QDate)),
-//! [3] //! [4]
+            //! [3] //! [4]
             this, SLOT(dateFilterChanged()));
-//! [4]
+    //! [4]
 
-//! [5]
+    //! [5]
     proxyView = new QTreeView;
     proxyView->setRootIsDecorated(false);
     proxyView->setAlternatingRowColors(true);
@@ -109,6 +114,26 @@ Window::Window()
     proxyView->setSortingEnabled(true);
     proxyView->sortByColumn(1, Qt::AscendingOrder);
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    QGridLayout *filterLayout = new QGridLayout;
+    filterLayout->addWidget(filterPatternLabel, 0, 0);
+    filterLayout->addWidget(filterPatternLineEdit, 0, 1);
+    filterLayout->addWidget(filterSyntaxComboBox, 0, 2);
+    filterLayout->addWidget(filterCaseSensitivityCheckBox, 1, 0, 1, 3);
+    filterLayout->addWidget(fromLabel, 2, 0);
+    filterLayout->addWidget(fromDateEdit, 2, 1, 1, 2);
+    filterLayout->addWidget(toLabel, 3, 0);
+    filterLayout->addWidget(toDateEdit, 3, 1, 1, 2);
+
+    filterWidget = new QWidget;
+    filterWidget->setLayout(filterLayout);
+
+    QHBoxLayout *proxyLayout = new QHBoxLayout;
+    proxyLayout->addWidget(proxyView);
+
+    proxyWidget = new QWidget;
+    proxyWidget->setLayout(proxyLayout);
+#else
     QGridLayout *proxyLayout = new QGridLayout;
     proxyLayout->addWidget(proxyView, 0, 0, 1, 3);
     proxyLayout->addWidget(filterPatternLabel, 1, 0);
@@ -122,9 +147,21 @@ Window::Window()
 
     proxyGroupBox = new QGroupBox(tr("Sorted/Filtered Model"));
     proxyGroupBox->setLayout(proxyLayout);
-//! [5]
+#endif
+    //! [5]
 
-//! [6]
+    //! [6]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    QTabWidget *tabWidget = new QTabWidget;
+    tabWidget->addTab(sourceWidget, "Original");
+    tabWidget->addTab(filterWidget, "Filters");
+    tabWidget->addTab(proxyWidget, "Sorted");
+
+    QVBoxLayout *mainLayout = new QVBoxLayout;
+    mainLayout->addWidget(tabWidget);
+    setLayout(mainLayout);
+    setWindowTitle(tr("Custom Model"));
+#else
     QVBoxLayout *mainLayout = new QVBoxLayout;
     mainLayout->addWidget(sourceGroupBox);
     mainLayout->addWidget(proxyGroupBox);
@@ -132,6 +169,7 @@ Window::Window()
 
     setWindowTitle(tr("Custom Sort/Filter Model"));
     resize(500, 450);
+#endif
 }
 //! [6]
 
@@ -151,7 +189,7 @@ void Window::textFilterChanged()
                     filterSyntaxComboBox->currentIndex()).toInt());
     Qt::CaseSensitivity caseSensitivity =
             filterCaseSensitivityCheckBox->isChecked() ? Qt::CaseSensitive
-                                                       : Qt::CaseInsensitive;
+                : Qt::CaseInsensitive;
 
     QRegExp regExp(filterPatternLineEdit->text(), caseSensitivity, syntax);
     proxyModel->setFilterRegExp(regExp);
index 15baffc..50ec1f4 100644 (file)
@@ -72,8 +72,14 @@ private slots:
 private:
     MySortFilterProxyModel *proxyModel;
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5 ) || defined(Q_WS_SIMULATOR)
+    QWidget *sourceWidget;
+    QWidget *filterWidget;
+    QWidget *proxyWidget;
+#else
     QGroupBox *sourceGroupBox;
     QGroupBox *proxyGroupBox;
+#endif
     QTreeView *sourceView;
     QTreeView *proxyView;
     QCheckBox *filterCaseSensitivityCheckBox;
index 28be5d7..21a84b3 100644 (file)
@@ -7,3 +7,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/dirview
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index ffa287b..3500d7b 100644 (file)
@@ -55,8 +55,12 @@ int main(int argc, char *argv[])
     tree.setSortingEnabled(true);
 
     tree.setWindowTitle(QObject::tr("Dir View"));
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+    tree.showMaximized();
+#else
     tree.resize(640, 480);
     tree.show();
+#endif
 
     return app.exec();
 }
index 6ed901c..7f4223f 100644 (file)
@@ -16,3 +16,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/editabletreemodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index b6e6b02..d8b3b9b 100644 (file)
@@ -48,6 +48,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();
 }
index 6f08ced..486a9ad 100644 (file)
@@ -48,6 +48,11 @@ MainWindow::MainWindow(QWidget *parent)
 {
     setupUi(this);
 
+#ifdef Q_WS_MAEMO_5
+    // Alternating row colors look bad on Maemo
+    view->setAlternatingRowColors(false);
+#endif
+
     QStringList headers;
     headers << tr("Title") << tr("Description");
 
index 2951d93..b7267e4 100644 (file)
@@ -10,3 +10,5 @@ sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/fetchmore
 INSTALLS += target sources
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index aedfd9f..c2deca3 100644 (file)
@@ -45,6 +45,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index a055fd9..faef47e 100644 (file)
@@ -7,3 +7,6 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/frozencolumn
 sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/frozencolumn
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index f6aa489..79f8ad4 100644 (file)
@@ -81,8 +81,14 @@ int main( int argc, char** argv )
       FreezeTableWidget *tableView = new FreezeTableWidget(model);
 
       tableView->setWindowTitle(QObject::tr("Frozen Column Example"));
+#if defined(Q_OS_SYMBIAN)
+      tableView->showMaximized();
+#elif defined(Q_WS_MAEMO_5)
+      tableView->show();
+#else
       tableView->resize(560,680);
       tableView->show();
+#endif
       return app.exec();
 }
 
index 68fbc91..4655b30 100644 (file)
@@ -2,7 +2,6 @@ TEMPLATE      = subdirs
 SUBDIRS       = addressbook \
                 basicsortfiltermodel \
                 chart \
-                coloreditorfactory \
                 combowidgetmapper \
                 customsortfiltermodel \
                 dirview \
@@ -14,12 +13,7 @@ SUBDIRS       = addressbook \
                 simpledommodel \
                 simpletreemodel \
                 simplewidgetmapper \
-                spinboxdelegate \
-                stardelegate
-
-symbian: SUBDIRS = \
-                addressbook \
-                chart
+                spinboxdelegate
 
 # install
 sources.files = README *.pro
@@ -27,3 +21,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index e7f45e3..0324b3a 100644 (file)
@@ -48,7 +48,11 @@ int main(int argc, char *argv[])
 
     QApplication app(argc, argv);
     MainWindow window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     window.openImage(":/images/qt.png");
     return app.exec();
 }
index 2f71d34..2464a3e 100644 (file)
@@ -14,3 +14,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/pixelator
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 9ec88e6..2c026e1 100644 (file)
@@ -80,7 +80,7 @@ void PixelDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
         painter->setBrush(option.palette.highlightedText());
     else
 //! [2]
-        painter->setBrush(QBrush(Qt::black));
+        painter->setBrush(option.palette.text());
 //! [9]
 
 //! [10]
index 6034194..bdba287 100644 (file)
@@ -49,6 +49,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     MainWindow window;
     window.openImage(":/images/example.jpg");
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 4d6da11..6fd5d63 100644 (file)
@@ -50,7 +50,7 @@ MainWindow::MainWindow(QWidget *parent)
 {
     setupMenus();
     setupWidgets();
-    model = new PiecesModel(this);
+    model = new PiecesModel(puzzleWidget->pieceSize(), this);
     piecesList->setModel(model);
 
     setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
@@ -92,8 +92,8 @@ void MainWindow::setupPuzzle()
 {
     int size = qMin(puzzleImage.width(), puzzleImage.height());
     puzzleImage = puzzleImage.copy((puzzleImage.width() - size)/2,
-        (puzzleImage.height() - size)/2, size, size).scaled(400,
-            400, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
+        (puzzleImage.height() - size)/2, size, size).scaled(puzzleWidget->imageSize(),
+            puzzleWidget->imageSize(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
 
     qsrand(QCursor::pos().x() ^ QCursor::pos().y());
 
@@ -125,21 +125,25 @@ void MainWindow::setupWidgets()
     QFrame *frame = new QFrame;
     QHBoxLayout *frameLayout = new QHBoxLayout(frame);
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+    puzzleWidget = new PuzzleWidget(260);
+#else
+    puzzleWidget = new PuzzleWidget(400);
+#endif
+
     piecesList = new QListView;
     piecesList->setDragEnabled(true);
     piecesList->setViewMode(QListView::IconMode);
-    piecesList->setIconSize(QSize(60, 60));
-    piecesList->setGridSize(QSize(80, 80));
+    piecesList->setIconSize(QSize(puzzleWidget->pieceSize() - 20, puzzleWidget->pieceSize() - 20));
+    piecesList->setGridSize(QSize(puzzleWidget->pieceSize(), puzzleWidget->pieceSize()));
     piecesList->setSpacing(10);
     piecesList->setMovement(QListView::Snap);
     piecesList->setAcceptDrops(true);
     piecesList->setDropIndicatorShown(true);
 
-    PiecesModel *model = new PiecesModel(this);
+    PiecesModel *model = new PiecesModel(puzzleWidget->pieceSize(), this);
     piecesList->setModel(model);
 
-    puzzleWidget = new PuzzleWidget;
-
     connect(puzzleWidget, SIGNAL(puzzleCompleted()),
             this, SLOT(setCompleted()), Qt::QueuedConnection);
 
index 4235050..520b571 100644 (file)
@@ -42,8 +42,8 @@
 
 #include "piecesmodel.h"
 
-PiecesModel::PiecesModel(QObject *parent)
-    : QAbstractListModel(parent)
+PiecesModel::PiecesModel(int pieceSize, QObject *parent)
+    : QAbstractListModel(parent), m_PieceSize(pieceSize)
 {
 }
 
@@ -53,7 +53,7 @@ QVariant PiecesModel::data(const QModelIndex &index, int role) const
         return QVariant();
 
     if (role == Qt::DecorationRole)
-        return QIcon(pixmaps.value(index.row()).scaled(60, 60,
+        return QIcon(pixmaps.value(index.row()).scaled(m_PieceSize, m_PieceSize,
                          Qt::KeepAspectRatio, Qt::SmoothTransformation));
     else if (role == Qt::UserRole)
         return pixmaps.value(index.row());
@@ -196,7 +196,7 @@ void PiecesModel::addPieces(const QPixmap& pixmap)
     endRemoveRows();
     for (int y = 0; y < 5; ++y) {
         for (int x = 0; x < 5; ++x) {
-            QPixmap pieceImage = pixmap.copy(x*80, y*80, 80, 80);
+            QPixmap pieceImage = pixmap.copy(x*m_PieceSize, y*m_PieceSize, m_PieceSize, m_PieceSize);
             addPiece(pieceImage, QPoint(x, y));
         }
     }
index 30bbdf8..40079fe 100644 (file)
@@ -56,7 +56,7 @@ class PiecesModel : public QAbstractListModel
     Q_OBJECT
 
 public:
-    PiecesModel(QObject *parent = 0);
+    PiecesModel(int pieceSize, QObject *parent = 0);
 
     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
     Qt::ItemFlags flags(const QModelIndex &index) const;
@@ -75,6 +75,8 @@ public:
 private:
     QList<QPoint> locations;
     QList<QPixmap> pixmaps;
+
+    int m_PieceSize;
 };
 
 #endif
index 16cbc5e..08e7efb 100644 (file)
@@ -19,3 +19,5 @@ wince* {
    DEPLOYMENT_PLUGIN += qjpeg qgif qtiff
 }
 
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index a0d769d..261e008 100644 (file)
 
 #include "puzzlewidget.h"
 
-PuzzleWidget::PuzzleWidget(QWidget *parent)
-    : QWidget(parent)
+PuzzleWidget::PuzzleWidget(int imageSize, QWidget *parent)
+    : QWidget(parent), m_ImageSize(imageSize)
 {
     setAcceptDrops(true);
-    setMinimumSize(400, 400);
-    setMaximumSize(400, 400);
+    setMinimumSize(m_ImageSize, m_ImageSize);
+    setMaximumSize(m_ImageSize, m_ImageSize);
 }
 
 void PuzzleWidget::clear()
@@ -116,7 +116,7 @@ void PuzzleWidget::dropEvent(QDropEvent *event)
         event->setDropAction(Qt::MoveAction);
         event->accept();
 
-        if (location == QPoint(square.x()/80, square.y()/80)) {
+        if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize())) {
             inPlace++;
             if (inPlace == 25)
                 emit puzzleCompleted();
@@ -151,7 +151,7 @@ void PuzzleWidget::mousePressEvent(QMouseEvent *event)
     piecePixmaps.removeAt(found);
     pieceRects.removeAt(found);
 
-    if (location == QPoint(square.x()/80, square.y()/80))
+    if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize()))
         inPlace--;
 
     update(square);
@@ -175,7 +175,7 @@ void PuzzleWidget::mousePressEvent(QMouseEvent *event)
         pieceRects.insert(found, square);
         update(targetSquare(event->pos()));
 
-        if (location == QPoint(square.x()/80, square.y()/80))
+        if (location == QPoint(square.x()/pieceSize(), square.y()/pieceSize()))
             inPlace++;
     }
 }
@@ -200,5 +200,15 @@ void PuzzleWidget::paintEvent(QPaintEvent *event)
 
 const QRect PuzzleWidget::targetSquare(const QPoint &position) const
 {
-    return QRect(position.x()/80 * 80, position.y()/80 * 80, 80, 80);
+    return QRect(position.x()/pieceSize() * pieceSize(), position.y()/pieceSize() * pieceSize(), pieceSize(), pieceSize());
+}
+
+int PuzzleWidget::pieceSize() const
+{
+    return m_ImageSize / 5;
+}
+
+int PuzzleWidget::imageSize() const
+{
+    return m_ImageSize;
 }
index e0356b4..2cc789c 100644 (file)
@@ -57,9 +57,12 @@ class PuzzleWidget : public QWidget
     Q_OBJECT
 
 public:
-    PuzzleWidget(QWidget *parent = 0);
+    PuzzleWidget(int imageSize, QWidget *parent = 0);
     void clear();
 
+    int pieceSize() const;
+    int imageSize() const;
+
 signals:
     void puzzleCompleted();
 
@@ -80,6 +83,7 @@ private:
     QList<QPoint> pieceLocations;
     QRect highlightedRect;
     int inPlace;
+    int m_ImageSize;
 };
 
 #endif
index 74a14b0..94496f8 100644 (file)
@@ -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)
+    window.show();
+#else
     window.resize(640, 480);
     window.show();
+#endif
     return app.exec();
 }
index a0b8f06..85ef37b 100644 (file)
@@ -15,3 +15,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpledommodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index b14b524..6401695 100644 (file)
@@ -56,6 +56,10 @@ int main(int argc, char *argv[])
     QTreeView view;
     view.setModel(&model);
     view.setWindowTitle(QObject::tr("Simple Tree Model"));
+#if defined(Q_OS_SYMBIAN)
+    view.showMaximized();
+#else
     view.show();
+#endif
     return app.exec();
 }
index 3ff238b..6533b46 100644 (file)
@@ -13,3 +13,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpletreemodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 41e756d..9e45ede 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char **argv)
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 0be57ba..5208115 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simplewidgetmapper
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index e078d7f..50d2ef1 100644 (file)
@@ -80,7 +80,11 @@ int main(int argc, char *argv[])
 
 //! [3]
     tableView.setWindowTitle(QObject::tr("Spin Box Delegate"));
+#if defined(Q_OS_SYMBIAN)
+    tableView.showMaximized();
+#else
     tableView.show();
+#endif
     return app.exec();
 }
 //! [3]
index 561ee29..bbee66a 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/spinboxdelegate
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 1af54d0..4f5c861 100644 (file)
@@ -100,7 +100,11 @@ int main(int argc, char *argv[])
 
     tableWidget.resizeColumnsToContents();
     tableWidget.resize(500, 300);
+#if defined(Q_OS_SYMBIAN)
+    tableWidget.showMaximized();
+#else
     tableWidget.show();
+#endif
 
     return app.exec();
 }
index 9e710f0..63d9bcb 100644 (file)
@@ -13,4 +13,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/stardelegate
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 40d37e2..b42e875 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/hellotr
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index cd0552f..2b15787 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/basiclayouts
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8aa11f4..6b60775 100644 (file)
@@ -46,5 +46,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Dialog dialog;
-    return dialog.exec();
+#if defined(Q_OS_SYMBIAN)
+    dialog.showMaximized();
+#else
+    dialog.show();
+#endif
+
+    return app.exec();
 }
index 6ddbb94..19075ab 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/borderlayout
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 58711be..690e52b 100644 (file)
 #include "dialog.h"
 
 Dialog::Dialog(QWidget *parent)
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    : QWidget(parent)
+#else
     : QDialog(parent)
+#endif
 {
     createRotableGroupBox();
     createOptionsGroupBox();
index 9409be1..3ada992 100644 (file)
@@ -41,6 +41,7 @@
 #ifndef DIALOG_H
 #define DIALOG_H
 
+#include <QMainWindow>
 #include <QDialog>
 #include <QQueue>
 
@@ -53,7 +54,11 @@ class QLabel;
 class QPushButton;
 QT_END_NAMESPACE
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+class Dialog : public QWidget
+#else
 class Dialog : public QDialog
+#endif
 {
     Q_OBJECT
 
index e0fbecc..44f2b5f 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/dynamiclayouts
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8aa11f4..c30db12 100644 (file)
@@ -46,5 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Dialog dialog;
-    return dialog.exec();
+#if defined(Q_OS_SYMBIAN)
+    dialog.showMaximized();
+#else
+    dialog.show();
+#endif
+    return app.exec();
 }
index 6d1a160..6064b5a 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts/flowlayout
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 51f09a8..0c7eb73 100644 (file)
@@ -56,4 +56,4 @@ Window::Window()
 
     setWindowTitle(tr("Flow Layout"));
 }
-//! [1]
\ No newline at end of file
+//! [1]
index 65bf7f2..678691a 100644 (file)
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/layouts
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index e1ff6f6..f9b7488 100644 (file)
@@ -16,3 +16,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/arrowpad
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 9c03bdc..69c28ec 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/hellotr
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 7de32ef..64b214c 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index fe3dc20..e874f5a 100644 (file)
@@ -12,3 +12,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/linguist/trollprint
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 10b2b84..6b8f80a 100644 (file)
@@ -12,3 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/application
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 9a9dc9c..14c7af2 100644 (file)
@@ -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]
index daba00c..a45b1e1 100644 (file)
@@ -10,3 +10,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/dockwidgets
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 6471c14..7301c96 100644 (file)
@@ -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
@@ -17,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 1a10a19..4e21e75 100644 (file)
@@ -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();
 }
index 74c418b..d545e88 100644 (file)
@@ -12,3 +12,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/mdi
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 01c8ada..dffe803 100644 (file)
@@ -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();
 }
index cae81f6..99f1ddc 100644 (file)
@@ -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);
index c437f16..4131d92 100644 (file)
@@ -12,3 +12,6 @@ symbian {
     TARGET.UID3 = 0xA000CF66
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index 3bbf013..37891b3 100644 (file)
@@ -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();
 }
index a8e83ff..c3057fd 100644 (file)
@@ -9,3 +9,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/recentfiles
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example might not fully work on Simulator platform)
index 0fb8a03..ae3586c 100644 (file)
@@ -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();
 }
index 70bbf65..5a75e2a 100644 (file)
@@ -10,3 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/sdi
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 942b19c..43ae8e9 100644 (file)
@@ -63,7 +63,7 @@ BearerMonitor::BearerMonitor(QWidget *parent)
     delete tabWidget->currentWidget();
     sessionGroup->hide();
 #endif
-#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI) || defined(Q_WS_SIMULATOR)
     setWindowState(Qt::WindowMaximized);
 #endif
     updateConfigurations();
@@ -87,7 +87,7 @@ BearerMonitor::BearerMonitor(QWidget *parent)
             this, SLOT(configurationChanged(const QNetworkConfiguration)));
     connect(&manager, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
 
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN)
     connect(registerButton, SIGNAL(clicked()), this, SLOT(registerNetwork()));
     connect(unregisterButton, SIGNAL(clicked()), this, SLOT(unregisterNetwork()));
 #else
@@ -226,7 +226,7 @@ void BearerMonitor::updateConfigurations()
 
         if (defaultConfiguration.type() == QNetworkConfiguration::ServiceNetwork)
             updateSnapConfiguration(defaultItem, defaultConfiguration);
-    } else if (defaultConfiguration.isValid()) {
+    } else {
         configurationAdded(defaultConfiguration);
     }
 
@@ -260,7 +260,7 @@ void BearerMonitor::onlineStateChanged(bool isOnline)
         onlineState->setText(tr("Offline"));
 }
 
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN)
 void BearerMonitor::registerNetwork()
 {
     QTreeWidgetItem *item = treeWidget->currentItem();
index a06522f..f4dbf81 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <qnetworkconfigmanager.h>
 #include <qnetworksession.h>
-#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE)      
+#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_SIMULATOR)
 #include "ui_bearermonitor_240_320.h"
 #elif defined(MAEMO_UI)
 #include "ui_bearermonitor_maemo.h"
@@ -72,7 +72,7 @@ private slots:
 
     void onlineStateChanged(bool isOnline);
 
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_WS_SIMULATOR)
     void registerNetwork();
     void unregisterNetwork();
 #endif
index bd9bd68..a91f064 100644 (file)
@@ -23,4 +23,11 @@ wince*:LIBS += -lws2
 
 CONFIG += console
 
-symbian:TARGET.CAPABILITY = NetworkServices ReadUserData
+symbian: {
+    TARGET.CAPABILITY = NetworkServices ReadUserData
+    include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
index f5def3d..bd2fb82 100644 (file)
@@ -44,7 +44,7 @@
 #include "blockingclient.h"
 
 BlockingClient::BlockingClient(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     hostLabel = new QLabel(tr("&Server name:"));
     portLabel = new QLabel(tr("S&erver port:"));
@@ -68,12 +68,35 @@ BlockingClient::BlockingClient(QWidget *parent)
     portLineEdit = new QLineEdit;
     portLineEdit->setValidator(new QIntValidator(1, 65535, this));
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    Qt::InputMethodHint hints = Qt::ImhDigitsOnly;
+    portLineEdit->setInputMethodHints(hints);
+#endif
+
     hostLabel->setBuddy(hostLineEdit);
     portLabel->setBuddy(portLineEdit);
 
     statusLabel = new QLabel(tr("This examples requires that you run the "
                                 "Fortune Server example as well."));
+    statusLabel->setWordWrap(true);
+
+#ifdef Q_OS_SYMBIAN
+    QMenu *menu = new QMenu(this);
+    fortuneAction = menu->addAction(tr("Get Fortune"));
+    fortuneAction->setVisible(false);
+
+    QAction *optionsAction = new QAction(tr("Options"), this);
+    optionsAction->setMenu(menu);
+    optionsAction->setSoftKeyRole(QAction::PositiveSoftKey);
+    addAction(optionsAction);
+
+    exitAction = new QAction(tr("Exit"), this);
+    exitAction->setSoftKeyRole(QAction::NegativeSoftKey);
+    addAction(exitAction);
 
+    connect(fortuneAction, SIGNAL(triggered()), this, SLOT(requestNewFortune()));
+    connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
+#else
     getFortuneButton = new QPushButton(tr("Get Fortune"));
     getFortuneButton->setDefault(true);
     getFortuneButton->setEnabled(false);
@@ -84,13 +107,14 @@ BlockingClient::BlockingClient(QWidget *parent)
     buttonBox->addButton(getFortuneButton, QDialogButtonBox::ActionRole);
     buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
 
+    connect(getFortuneButton, SIGNAL(clicked()), this, SLOT(requestNewFortune()));
+    connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+#endif
+
     connect(hostLineEdit, SIGNAL(textChanged(QString)),
             this, SLOT(enableGetFortuneButton()));
     connect(portLineEdit, SIGNAL(textChanged(QString)),
             this, SLOT(enableGetFortuneButton()));
-    connect(getFortuneButton, SIGNAL(clicked()),
-            this, SLOT(requestNewFortune()));
-    connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
 //! [0]
     connect(&thread, SIGNAL(newFortune(QString)),
             this, SLOT(showFortune(QString)));
@@ -105,7 +129,9 @@ BlockingClient::BlockingClient(QWidget *parent)
     mainLayout->addWidget(portLabel, 1, 0);
     mainLayout->addWidget(portLineEdit, 1, 1);
     mainLayout->addWidget(statusLabel, 2, 0, 1, 2);
+#ifndef Q_OS_SYMBIAN
     mainLayout->addWidget(buttonBox, 3, 0, 1, 2);
+#endif
     setLayout(mainLayout);
 
     setWindowTitle(tr("Blocking Fortune Client"));
@@ -115,7 +141,11 @@ BlockingClient::BlockingClient(QWidget *parent)
 //! [2]
 void BlockingClient::requestNewFortune()
 {
+#ifdef Q_OS_SYMBIAN
+    fortuneAction->setVisible(false);
+#else
     getFortuneButton->setEnabled(false);
+#endif
     thread.requestNewFortune(hostLineEdit->text(),
                              portLineEdit->text().toInt());
 }
@@ -133,7 +163,11 @@ void BlockingClient::showFortune(const QString &nextFortune)
 //! [4]
     currentFortune = nextFortune;
     statusLabel->setText(currentFortune);
+#ifdef Q_OS_SYMBIAN
+    fortuneAction->setVisible(true);
+#else
     getFortuneButton->setEnabled(true);
+#endif
 }
 //! [4]
 
@@ -158,11 +192,19 @@ void BlockingClient::displayError(int socketError, const QString &message)
                                  .arg(message));
     }
 
+#ifdef Q_OS_SYMBIAN
+    fortuneAction->setVisible(true);
+#else
     getFortuneButton->setEnabled(true);
+#endif
 }
 
 void BlockingClient::enableGetFortuneButton()
 {
-    getFortuneButton->setEnabled(!hostLineEdit->text().isEmpty()
-                                 && !portLineEdit->text().isEmpty());
+    bool enable(!hostLineEdit->text().isEmpty() && !portLineEdit->text().isEmpty());
+#ifdef Q_OS_SYMBIAN
+    fortuneAction->setVisible(enable);
+#else
+    getFortuneButton->setEnabled(enable);
+#endif
 }
index 8b76fa6..83ff93b 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef BLOCKINGCLIENT_H
 #define BLOCKINGCLIENT_H
 
-#include <QDialog>
+#include <QWidget>
 
 #include "fortunethread.h"
 
@@ -50,10 +50,11 @@ class QDialogButtonBox;
 class QLabel;
 class QLineEdit;
 class QPushButton;
+class QAction;
 QT_END_NAMESPACE
 
 //! [0]
-class BlockingClient : public QDialog
+class BlockingClient : public QWidget
 {
     Q_OBJECT
 
@@ -72,9 +73,14 @@ private:
     QLineEdit *hostLineEdit;
     QLineEdit *portLineEdit;
     QLabel *statusLabel;
+#ifdef Q_OS_SYMBIAN
+    QAction *fortuneAction;
+    QAction *exitAction;
+#else
     QPushButton *getFortuneButton;
     QPushButton *quitButton;
     QDialogButtonBox *buttonBox;
+#endif
 
     FortuneThread thread;
     QString currentFortune;
index 2faedaa..ea64f00 100644 (file)
@@ -11,4 +11,11 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS blockingfortuneclient.pr
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/blockingfortuneclient
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
+}
+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)
index d1ff165..97ce59f 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     BlockingClient client;
+#ifdef Q_OS_SYMBIAN
+    client.showMaximized();
+#else
     client.show();
-    return client.exec();
+#endif
+    return app.exec();
 }
index 458585d..adef726 100644 (file)
@@ -9,4 +9,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastreceiver.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/broadcastreceiver
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
+}
+maemo5: CONFIG += qt_example
index 0411631..80d0bba 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Receiver receiver;
+#ifdef Q_OS_SYMBIAN
+    receiver.showMaximized();
+#else
     receiver.show();
-    return receiver.exec();
+#endif
+    return app.exec();
 }
index bd45a3c..04feffb 100644 (file)
 #include "receiver.h"
 
 Receiver::Receiver(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     statusLabel = new QLabel(tr("Listening for broadcasted messages"));
+    statusLabel->setWordWrap(true);
+
+#ifdef Q_OS_SYMBIAN
+    quitAction = new QAction(tr("Exit"), this);
+    quitAction->setSoftKeyRole(QAction::NegativeSoftKey);
+    addAction(quitAction);
+#else
     quitButton = new QPushButton(tr("&Quit"));
+#endif
 
 //! [0]
     udpSocket = new QUdpSocket(this);
@@ -58,6 +66,13 @@ Receiver::Receiver(QWidget *parent)
     connect(udpSocket, SIGNAL(readyRead()),
             this, SLOT(processPendingDatagrams()));
 //! [1]
+#ifdef Q_OS_SYMBIAN
+    connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+    QVBoxLayout *mainLayout = new QVBoxLayout;
+    mainLayout->addWidget(statusLabel);
+    setLayout(mainLayout);
+#else
     connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
 
     QHBoxLayout *buttonLayout = new QHBoxLayout;
@@ -69,6 +84,7 @@ Receiver::Receiver(QWidget *parent)
     mainLayout->addWidget(statusLabel);
     mainLayout->addLayout(buttonLayout);
     setLayout(mainLayout);
+#endif
 
     setWindowTitle(tr("Broadcast Receiver"));
 }
index 80b35a5..3084da1 100644 (file)
 #ifndef RECEIVER_H
 #define RECEIVER_H
 
-#include <QDialog>
+#include <QWidget>
 
 QT_BEGIN_NAMESPACE
 class QLabel;
 class QPushButton;
 class QUdpSocket;
+class QAction;
 QT_END_NAMESPACE
 
-class Receiver : public QDialog
+class Receiver : public QWidget
 {
     Q_OBJECT
 
@@ -61,7 +62,11 @@ private slots:
 
 private:
     QLabel *statusLabel;
+#ifdef Q_OS_SYMBIAN
+    QAction *quitAction;
+#else
     QPushButton *quitButton;
+#endif
     QUdpSocket *udpSocket;
 };
 
index eb76c38..d2bf78d 100644 (file)
@@ -9,4 +9,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS broadcastsender.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/broadcastsender
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
+}
+maemo5: CONFIG += qt_example
index 56e35c9..88be21d 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Sender sender;
+#ifdef Q_OS_SYMBIAN
+    sender.showMaximized();
+#else
     sender.show();
-    return sender.exec();
+#endif
+    return app.exec();
 }
index d753094..7ce877d 100644 (file)
 #include "sender.h"
 
 Sender::Sender(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     statusLabel = new QLabel(tr("Ready to broadcast datagrams on port 45454"));
+    statusLabel->setWordWrap(true);
 
     startButton = new QPushButton(tr("&Start"));
     quitButton = new QPushButton(tr("&Quit"));
index d592051..666269f 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef SENDER_H
 #define SENDER_H
 
-#include <QDialog>
+#include <QWidget>
 
 QT_BEGIN_NAMESPACE
 class QDialogButtonBox;
@@ -51,7 +51,7 @@ class QTimer;
 class QUdpSocket;
 QT_END_NAMESPACE
 
-class Sender : public QDialog
+class Sender : public QWidget
 {
     Q_OBJECT
 
index 4bea359..a3b270d 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 QT = core network
@@ -19,3 +18,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/download
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8855aae..2f83f41 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 QT = core network
@@ -20,3 +19,14 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/downloadmanager
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+OTHER_FILES += \
+    debian/changelog \
+    debian/compat \
+    debian/control \
+    debian/copyright \
+    debian/README \
+    debian/rules
+symbian: warning(This example might not fully work on Symbian platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 2e3ec01..2737f98 100644 (file)
@@ -14,3 +14,8 @@ symbian {
     TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
     TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index c34c565..1d84c49 100644 (file)
@@ -15,3 +15,8 @@ symbian {
     TARGET.CAPABILITY = "NetworkServices ReadUserData"
     TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index e118dc9..9b8fa94 100644 (file)
@@ -7,3 +7,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/googlesuggest
 sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/googlesuggest
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 74a8e49..7da0979 100644 (file)
@@ -10,4 +10,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS http.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/http
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
+}
+maemo5: CONFIG += qt_example
index 874994a..6497a33 100644 (file)
 #include "ui_authenticationdialog.h"
 
 HttpWindow::HttpWindow(QWidget *parent)
+#ifdef Q_WS_MAEMO_5
+    : QWidget(parent)
+#else
     : QDialog(parent)
+#endif
 {
 #ifndef QT_NO_OPENSSL
     urlLineEdit = new QLineEdit("https://qt.nokia.com/");
@@ -57,6 +61,7 @@ HttpWindow::HttpWindow(QWidget *parent)
     urlLabel->setBuddy(urlLineEdit);
     statusLabel = new QLabel(tr("Please enter the URL of a file you want to "
                                 "download."));
+    statusLabel->setWordWrap(true);
 
     downloadButton = new QPushButton(tr("Download"));
     downloadButton->setDefault(true);
@@ -67,7 +72,9 @@ HttpWindow::HttpWindow(QWidget *parent)
     buttonBox->addButton(downloadButton, QDialogButtonBox::ActionRole);
     buttonBox->addButton(quitButton, QDialogButtonBox::RejectRole);
 
+#ifndef Q_WS_MAEMO_5
     progressDialog = new QProgressDialog(this);
+#endif
 
     connect(urlLineEdit, SIGNAL(textChanged(QString)),
             this, SLOT(enableDownloadButton()));
@@ -78,7 +85,9 @@ HttpWindow::HttpWindow(QWidget *parent)
     connect(&qnam, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
             this, SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
 #endif
+#ifndef Q_WS_MAEMO_5
     connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelDownload()));
+#endif
     connect(downloadButton, SIGNAL(clicked()), this, SLOT(downloadFile()));
     connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
 
@@ -117,7 +126,7 @@ void HttpWindow::downloadFile()
         fileName = "index.html";
 
     if (QFile::exists(fileName)) {
-        if (QMessageBox::question(this, tr("HTTP"), 
+        if (QMessageBox::question(this, tr("HTTP"),
                                   tr("There already exists a file called %1 in "
                                      "the current directory. Overwrite?").arg(fileName),
                                   QMessageBox::Yes|QMessageBox::No, QMessageBox::No)
@@ -136,9 +145,10 @@ void HttpWindow::downloadFile()
         return;
     }
 
-
+#ifndef Q_WS_MAEMO_5
     progressDialog->setWindowTitle(tr("HTTP"));
     progressDialog->setLabelText(tr("Downloading %1.").arg(fileName));
+#endif
     downloadButton->setEnabled(false);
 
     // schedule the request
@@ -164,11 +174,15 @@ void HttpWindow::httpFinished()
             file = 0;
         }
         reply->deleteLater();
+#ifndef Q_WS_MAEMO_5
         progressDialog->hide();
+#endif
         return;
     }
 
+#ifndef Q_WS_MAEMO_5
     progressDialog->hide();
+#endif
     file->flush();
     file->close();
 
@@ -194,7 +208,7 @@ void HttpWindow::httpFinished()
         }
     } else {
         QString fileName = QFileInfo(QUrl(urlLineEdit->text()).path()).fileName();
-        statusLabel->setText(tr("Downloaded %1 to current directory.").arg(fileName));
+        statusLabel->setText(tr("Downloaded %1 to %2.").arg(fileName).arg(QDir::currentPath()));
         downloadButton->setEnabled(true);
     }
 
@@ -219,8 +233,13 @@ void HttpWindow::updateDataReadProgress(qint64 bytesRead, qint64 totalBytes)
     if (httpRequestAborted)
         return;
 
+#ifndef Q_WS_MAEMO_5
     progressDialog->setMaximum(totalBytes);
     progressDialog->setValue(bytesRead);
+#else
+    Q_UNUSED(bytesRead);
+    Q_UNUSED(totalBytes);
+#endif
 }
 
 void HttpWindow::enableDownloadButton()
index 0ec87af..8bbe1a2 100644 (file)
 #ifndef HTTPWINDOW_H
 #define HTTPWINDOW_H
 
+#ifdef Q_WS_MAEMO_5
+#include <QWidget>
+#else
 #include <QDialog>
+#endif
 #include <QNetworkAccessManager>
 #include <QUrl>
 
@@ -59,7 +63,11 @@ class QNetworkReply;
 
 QT_END_NAMESPACE
 
+#ifdef Q_WS_MAEMO_5
+class HttpWindow : public QWidget
+#else
 class HttpWindow : public QDialog
+#endif
 {
     Q_OBJECT
 
@@ -84,7 +92,9 @@ private:
     QLabel *statusLabel;
     QLabel *urlLabel;
     QLineEdit *urlLineEdit;
+#ifndef Q_WS_MAEMO_5
     QProgressDialog *progressDialog;
+#endif
     QPushButton *downloadButton;
     QPushButton *quitButton;
     QDialogButtonBox *buttonBox;
index 4c4f61c..e4f1574 100644 (file)
 ****************************************************************************/
 
 #include <QApplication>
+#include <QDir>
 
 #include "httpwindow.h"
 
 int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
+
+#if defined(Q_OS_SYMBIAN)
+    // Change current directory from default private to c:\data
+    // in order that user can access the downloaded content
+    QDir::setCurrent("c:\\data");
+#elif defined(Q_WS_MAEMO_5)
+    QDir::setCurrent("/home/user");
+#endif
+
     HttpWindow httpWin;
+
+#if defined(Q_OS_SYMBIAN)
+    httpWin.showMaximized();
+#else
     httpWin.show();
-    return httpWin.exec();
+#endif
+    return app.exec();
 }
index 50a191e..14154b4 100644 (file)
@@ -58,6 +58,22 @@ Dialog::Dialog(QWidget *parent)
     serverProgressBar = new QProgressBar;
     serverStatusLabel = new QLabel(tr("Server ready"));
 
+#ifdef Q_OS_SYMBIAN
+    QMenu *menu = new QMenu(this);
+
+    QAction *optionsAction = new QAction(tr("Options"), this);
+    optionsAction->setSoftKeyRole(QAction::PositiveSoftKey);
+    optionsAction->setMenu(menu);
+    addAction(optionsAction);
+
+    startAction = menu->addAction(tr("Start"), this, SLOT(start()));
+
+    quitAction = new QAction(tr("Exit"), this);
+    quitAction->setSoftKeyRole(QAction::NegativeSoftKey);
+    addAction(quitAction);
+
+    connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+#else
     startButton = new QPushButton(tr("&Start"));
     quitButton = new QPushButton(tr("&Quit"));
 
@@ -67,6 +83,7 @@ Dialog::Dialog(QWidget *parent)
 
     connect(startButton, SIGNAL(clicked()), this, SLOT(start()));
     connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
+#endif
     connect(&tcpServer, SIGNAL(newConnection()),
             this, SLOT(acceptConnection()));
     connect(&tcpClient, SIGNAL(connected()), this, SLOT(startTransfer()));
@@ -82,7 +99,9 @@ Dialog::Dialog(QWidget *parent)
     mainLayout->addWidget(serverStatusLabel);
     mainLayout->addStretch(1);
     mainLayout->addSpacing(10);
+#ifndef Q_OS_SYMBIAN
     mainLayout->addWidget(buttonBox);
+#endif
     setLayout(mainLayout);
 
     setWindowTitle(tr("Loopback"));
@@ -90,7 +109,11 @@ Dialog::Dialog(QWidget *parent)
 
 void Dialog::start()
 {
+#ifdef Q_OS_SYMBIAN
+    startAction->setVisible(false);
+#else
     startButton->setEnabled(false);
+#endif
 
 #ifndef QT_NO_CURSOR
     QApplication::setOverrideCursor(Qt::WaitCursor);
@@ -146,7 +169,11 @@ void Dialog::updateServerProgress()
 
     if (bytesReceived == TotalBytes) {
         tcpServerConnection->close();
+#ifdef Q_OS_SYMBIAN
+        startAction->setVisible(true);
+#else
         startButton->setEnabled(true);
+#endif
 #ifndef QT_NO_CURSOR
         QApplication::restoreOverrideCursor();
 #endif
@@ -183,7 +210,11 @@ void Dialog::displayError(QAbstractSocket::SocketError socketError)
     serverProgressBar->reset();
     clientStatusLabel->setText(tr("Client ready"));
     serverStatusLabel->setText(tr("Server ready"));
+#ifdef Q_OS_SYMBIAN
+    startAction->setVisible(true);
+#else
     startButton->setEnabled(true);
+#endif
 #ifndef QT_NO_CURSOR
     QApplication::restoreOverrideCursor();
 #endif
index 09b4366..b48c090 100644 (file)
@@ -52,6 +52,7 @@ class QProgressBar;
 class QPushButton;
 class QTcpServer;
 class QTcpSocket;
+class QAction;
 QT_END_NAMESPACE
 
 class Dialog : public QDialog
@@ -74,9 +75,15 @@ private:
     QProgressBar *serverProgressBar;
     QLabel *clientStatusLabel;
     QLabel *serverStatusLabel;
+
+#ifdef Q_OS_SYMBIAN
+    QAction *startAction;
+    QAction *quitAction;
+#else
     QPushButton *startButton;
     QPushButton *quitButton;
     QDialogButtonBox *buttonBox;
+#endif
 
     QTcpServer tcpServer;
     QTcpSocket tcpClient;
index ea175b3..3565058 100644 (file)
@@ -9,4 +9,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS loopback.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/loopback
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
+}
+maemo5: CONFIG += qt_example
index 6810b79..7f26fd4 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Dialog dialog;
+#ifdef Q_OS_SYMBIAN
+    dialog.showMaximized();
+#else
     dialog.show();
-    return dialog.exec();
+#endif
+    return app.exec();
 }
index 7c1514f..ca4e8be 100644 (file)
@@ -24,3 +24,7 @@ symbian {
     TARGET.CAPABILITY = "NetworkServices ReadUserData WriteUserData"
     TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
index 09765a6..b8416bb 100644 (file)
@@ -35,3 +35,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index c3e629f..c0a2b73 100644 (file)
@@ -51,7 +51,7 @@ FtpWindow::FtpWindow(QWidget *parent)
     ftpServerLabel->setBuddy(ftpServerLineEdit);
 
     statusLabel = new QLabel(tr("Please enter the name of an FTP server."));
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
     // Use word wrapping to fit the text on screen
     statusLabel->setWordWrap( true );
 #endif
@@ -243,6 +243,12 @@ void FtpWindow::downloadFile()
 void FtpWindow::cancelDownload()
 {
     ftp->abort();
+
+    if (file->exists()) {
+        file->close();
+        file->remove();
+    }
+    delete file;
 }
 //![5]
 
index 0e62d15..5775f01 100644 (file)
@@ -16,3 +16,7 @@ symbian {
     INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
     TARGET.CAPABILITY="NetworkServices ReadUserData WriteUserData"
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
index ff3a4d2..b1a9acb 100644 (file)
@@ -47,7 +47,7 @@ CertificateInfo::CertificateInfo(QWidget *parent)
     form = new Ui_CertificateInfo;
     form->setupUi(this);
 
-    connect(form->certificationPathView, SIGNAL(currentRowChanged(int)),
+    connect(form->certificationPathView, SIGNAL(currentIndexChanged(int)),
             this, SLOT(updateCertificateInfo(int)));
 }
 
@@ -69,7 +69,7 @@ void CertificateInfo::setCertificateChain(const QList<QSslCertificate> &chain)
                                              .arg(cert.subjectInfo(QSslCertificate::CommonName)));
     }
 
-    form->certificationPathView->setCurrentRow(0);
+    form->certificationPathView->setCurrentIndex(0);
 }
 
 void CertificateInfo::updateCertificateInfo(int index)
index 3761fe8..c5238eb 100644 (file)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>CertificateInfo</class>
- <widget class="QDialog" name="CertificateInfo" >
-  <property name="geometry" >
+ <widget class="QDialog" name="CertificateInfo">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>397</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Display Certificate Information</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetDefaultConstraint</enum>
+   </property>
    <item>
-    <widget class="QGroupBox" name="groupBox" >
-     <property name="title" >
+    <widget class="QLabel" name="label">
+     <property name="text">
       <string>Certification Path</string>
      </property>
-     <layout class="QHBoxLayout" >
-      <item>
-       <widget class="QListWidget" name="certificationPathView" />
-      </item>
-     </layout>
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_2" >
-     <property name="title" >
+    <widget class="QComboBox" name="certificationPathView">
+     <property name="minimumContentsLength">
+      <number>3</number>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLabel" name="label_2">
+     <property name="text">
       <string>Certificate Information</string>
      </property>
-     <layout class="QHBoxLayout" >
-      <item>
-       <widget class="QListWidget" name="certificateInfoView" />
-      </item>
-     </layout>
     </widget>
    </item>
    <item>
-    <layout class="QHBoxLayout" >
+    <widget class="QListWidget" name="certificateInfoView">
+     <property name="font">
+      <font>
+       <pointsize>8</pointsize>
+      </font>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout">
+     <property name="sizeConstraint">
+      <enum>QLayout::SetDefaultConstraint</enum>
+     </property>
      <item>
       <spacer>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
@@ -53,8 +69,8 @@
       </spacer>
      </item>
      <item>
-      <widget class="QDialogButtonBox" name="buttonBox" >
-       <property name="standardButtons" >
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="standardButtons">
         <set>QDialogButtonBox::Close</set>
        </property>
       </widget>
    <receiver>CertificateInfo</receiver>
    <slot>accept()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>343</x>
      <y>374</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>352</x>
      <y>422</y>
     </hint>
index c15534b..ca50f31 100644 (file)
@@ -56,7 +56,11 @@ int main(int argc, char **argv)
     }
 
     SslClient client;
+#ifdef Q_OS_SYMBIAN
+    client.showMaximized();
+#else
     client.show();
+#endif
 
     return app.exec();
 }
index f6276dd..ae4b15f 100644 (file)
@@ -18,4 +18,7 @@ INSTALLS += target sources
 symbian {
     TARGET.UID3 = 0xA000CF67
     CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
 }
+maemo5: CONFIG += qt_example
+
index 43b81cd..11e6ffd 100644 (file)
@@ -82,7 +82,6 @@ void SslClient::updateEnabledState()
     form->connectButton->setEnabled(unconnected && !form->hostNameEdit->text().isEmpty());
 
     bool connected = socket && socket->state() == QAbstractSocket::ConnectedState;
-    form->sessionBox->setEnabled(connected);
     form->sessionOutput->setEnabled(connected);
     form->sessionInput->setEnabled(connected);
     form->sessionInputLabel->setEnabled(connected);
@@ -193,6 +192,9 @@ void SslClient::sslErrors(const QList<QSslError> &errors)
         ui.sslErrorList->addItem(error.errorString());
 
     executingDialog = true;
+#ifdef Q_OS_SYMBIAN
+    errorDialog.showMaximized();
+#endif
     if (errorDialog.exec() == QDialog::Accepted)
         socket->ignoreSslErrors();
     executingDialog = false;
@@ -206,6 +208,9 @@ void SslClient::displayCertificateInfo()
 {
     CertificateInfo *info = new CertificateInfo(this);
     info->setCertificateChain(socket->peerCertificateChain());
+#ifdef Q_OS_SYMBIAN
+    info->showMaximized();
+#endif
     info->exec();
     info->deleteLater();
 }
index 5a24751..4b81fe4 100644 (file)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>Form</class>
- <widget class="QWidget" name="Form" >
-  <property name="geometry" >
+ <widget class="QWidget" name="Form">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>320</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Secure Socket Client</string>
   </property>
-  <layout class="QVBoxLayout" >
-   <item>
-    <layout class="QGridLayout" >
-     <item row="0" column="0" >
-      <widget class="QLabel" name="hostNameLabel" >
-       <property name="text" >
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0" colspan="2">
+    <layout class="QGridLayout">
+     <item row="0" column="0">
+      <widget class="QLabel" name="hostNameLabel">
+       <property name="text">
         <string>Host name:</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
-      <widget class="QLineEdit" name="hostNameEdit" >
-       <property name="text" >
+     <item row="0" column="1">
+      <widget class="QLineEdit" name="hostNameEdit">
+       <property name="text">
         <string>imap.example.com</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="0" >
-      <widget class="QLabel" name="portLabel" >
-       <property name="text" >
+     <item row="1" column="0">
+      <widget class="QLabel" name="portLabel">
+       <property name="text">
         <string>Port:</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="1" >
-      <widget class="QSpinBox" name="portBox" >
-       <property name="minimum" >
+     <item row="1" column="1">
+      <widget class="QSpinBox" name="portBox">
+       <property name="minimum">
         <number>1</number>
        </property>
-       <property name="maximum" >
+       <property name="maximum">
         <number>65535</number>
        </property>
-       <property name="value" >
+       <property name="value">
         <number>993</number>
        </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item>
-    <widget class="QPushButton" name="connectButton" >
-     <property name="enabled" >
+   <item row="1" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Active session</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="connectButton">
+     <property name="enabled">
       <bool>true</bool>
      </property>
-     <property name="text" >
+     <property name="text">
       <string>Connect to host</string>
      </property>
-     <property name="default" >
+     <property name="default">
       <bool>true</bool>
      </property>
     </widget>
    </item>
-   <item>
-    <widget class="QGroupBox" name="sessionBox" >
-     <property name="enabled" >
+   <item row="2" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <item>
+      <widget class="QLabel" name="cipherText">
+       <property name="text">
+        <string>Cryptographic Cipher:</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="cipherLabel">
+       <property name="text">
+        <string>&lt;none&gt;</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="3" column="0" colspan="2">
+    <widget class="QTextEdit" name="sessionOutput">
+     <property name="enabled">
       <bool>false</bool>
      </property>
-     <property name="title" >
-      <string>Active session</string>
+     <property name="focusPolicy">
+      <enum>Qt::StrongFocus</enum>
      </property>
-     <layout class="QVBoxLayout" >
-      <item>
-       <layout class="QHBoxLayout" >
-        <item>
-         <widget class="QLabel" name="cipherText" >
-          <property name="text" >
-           <string>Cryptographic Cipher:</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLabel" name="cipherLabel" >
-          <property name="text" >
-           <string>&lt;none></string>
-          </property>
-          <property name="alignment" >
-           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-      <item>
-       <widget class="QTextEdit" name="sessionOutput" >
-        <property name="enabled" >
-         <bool>false</bool>
-        </property>
-        <property name="focusPolicy" >
-         <enum>Qt::NoFocus</enum>
-        </property>
-        <property name="readOnly" >
-         <bool>true</bool>
-        </property>
-        <property name="html" >
-         <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+     <property name="readOnly">
+      <bool>true</bool>
+     </property>
+     <property name="html">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
-&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <layout class="QHBoxLayout" >
-        <item>
-         <widget class="QLabel" name="sessionInputLabel" >
-          <property name="text" >
-           <string>Input:</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLineEdit" name="sessionInput" >
-          <property name="enabled" >
-           <bool>false</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QPushButton" name="sendButton" >
-          <property name="enabled" >
-           <bool>false</bool>
-          </property>
-          <property name="focusPolicy" >
-           <enum>Qt::TabFocus</enum>
-          </property>
-          <property name="text" >
-           <string>&amp;Send</string>
-          </property>
-          <property name="default" >
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
     </widget>
    </item>
+   <item row="4" column="0" colspan="2">
+    <layout class="QHBoxLayout">
+     <item>
+      <widget class="QLabel" name="sessionInputLabel">
+       <property name="text">
+        <string>Input:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="sessionInput">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="sendButton">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="focusPolicy">
+        <enum>Qt::TabFocus</enum>
+       </property>
+       <property name="text">
+        <string>&amp;Send</string>
+       </property>
+       <property name="default">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
   </layout>
  </widget>
  <resources/>
@@ -160,11 +163,11 @@ p, li { white-space: pre-wrap; }
    <receiver>connectButton</receiver>
    <slot>animateClick()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>126</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>142</x>
      <y>78</y>
     </hint>
@@ -176,11 +179,11 @@ p, li { white-space: pre-wrap; }
    <receiver>sendButton</receiver>
    <slot>animateClick()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>142</x>
      <y>241</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>297</x>
      <y>234</y>
     </hint>
index 4aac18c..1aadbfe 100644 (file)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>SslErrors</class>
- <widget class="QDialog" name="SslErrors" >
-  <property name="geometry" >
+ <widget class="QDialog" name="SslErrors">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>216</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Unable To Validate The Connection</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout">
    <item>
-    <widget class="QLabel" name="label" >
-     <property name="text" >
-      <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; color:#ff0000;">Warning&lt;/span>&lt;span style=" color:#ff0000;">:&lt;/span>&lt;span style=" color:#000000;"> One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click &lt;/span>&lt;span style=" color:#000000;">Ignore&lt;/span>&lt;span style=" color:#000000;"> to continue, or &lt;/span>&lt;span style=" color:#000000;">Cancel&lt;/span>&lt;span style=" color:#000000;"> to abort the connection.&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;Warning&lt;/span&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt; One or more errors with this connection prevent validating the authenticity of the host you are connecting to. Please review the following list of errors, and click &lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt;Ignore&lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt; to continue, or &lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt;Cancel&lt;/span&gt;&lt;span style=&quot; color:#000000;&quot;&gt; to abort the connection.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
      </property>
-     <property name="wordWrap" >
+     <property name="wordWrap">
       <bool>true</bool>
      </property>
     </widget>
    </item>
    <item>
-    <widget class="QListWidget" name="sslErrorList" />
+    <widget class="QListWidget" name="sslErrorList">
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
    </item>
    <item>
-    <layout class="QHBoxLayout" >
+    <layout class="QHBoxLayout">
      <item>
-      <widget class="QPushButton" name="certificateChainButton" >
-       <property name="text" >
+      <widget class="QPushButton" name="certificateChainButton">
+       <property name="text">
         <string>View Certificate Chain</string>
        </property>
-       <property name="autoDefault" >
+       <property name="autoDefault">
         <bool>false</bool>
        </property>
       </widget>
      </item>
      <item>
       <spacer>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
@@ -55,15 +60,15 @@ p, li { white-space: pre-wrap; }
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="pushButton" >
-       <property name="text" >
+      <widget class="QPushButton" name="pushButton">
+       <property name="text">
         <string>Ignore</string>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="pushButton_2" >
-       <property name="text" >
+      <widget class="QPushButton" name="pushButton_2">
+       <property name="text">
         <string>Cancel</string>
        </property>
       </widget>
@@ -80,11 +85,11 @@ p, li { white-space: pre-wrap; }
    <receiver>SslErrors</receiver>
    <slot>accept()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>235</x>
      <y>185</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>228</x>
      <y>287</y>
     </hint>
@@ -96,11 +101,11 @@ p, li { white-space: pre-wrap; }
    <receiver>SslErrors</receiver>
    <slot>reject()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>325</x>
      <y>192</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>333</x>
      <y>231</y>
     </hint>
index b69f42c..27bf253 100644 (file)
 #include "fortuneserver.h"
 
 Dialog::Dialog(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     statusLabel = new QLabel;
+    statusLabel->setWordWrap(true);
+#ifdef Q_OS_SYMBIAN
+    QAction *quitAction = new QAction(tr("Exit"), this);
+    quitAction->setSoftKeyRole(QAction::NegativeSoftKey);
+    addAction(quitAction);
+#else
     quitButton = new QPushButton(tr("Quit"));
     quitButton->setAutoDefault(false);
+#endif
 
     if (!server.listen()) {
         QMessageBox::critical(this, tr("Threaded Fortune Server"),
@@ -78,6 +85,13 @@ Dialog::Dialog(QWidget *parent)
                             "Run the Fortune Client example now.")
                          .arg(ipAddress).arg(server.serverPort()));
 
+#ifdef Q_OS_SYMBIAN
+    connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+
+    QVBoxLayout *mainLayout = new QVBoxLayout;
+    mainLayout->addWidget(statusLabel);
+    setLayout(mainLayout);
+#else
     connect(quitButton, SIGNAL(clicked()), this, SLOT(close()));
 
     QHBoxLayout *buttonLayout = new QHBoxLayout;
@@ -89,6 +103,6 @@ Dialog::Dialog(QWidget *parent)
     mainLayout->addWidget(statusLabel);
     mainLayout->addLayout(buttonLayout);
     setLayout(mainLayout);
-
+#endif
     setWindowTitle(tr("Threaded Fortune Server"));
 }
index 10ae3eb..19a6fc2 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef DIALOG_H
 #define DIALOG_H
 
-#include <QDialog>
+#include <QWidget>
 #include "fortuneserver.h"
 
 QT_BEGIN_NAMESPACE
@@ -49,7 +49,7 @@ class QLabel;
 class QPushButton;
 QT_END_NAMESPACE
 
-class Dialog : public QDialog
+class Dialog : public QWidget
 {
     Q_OBJECT
 
index 396f924..1e245e9 100644 (file)
@@ -49,7 +49,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Dialog dialog;
+#ifdef Q_OS_SYMBIAN
+    dialog.showMaximized();
+#else
     dialog.show();
+#endif
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
-    return dialog.exec();
+    return app.exec();
 }
index a76974a..335666b 100644 (file)
@@ -13,4 +13,11 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS threadedfortuneserver.pr
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/threadedfortuneserver
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    TARGET.CAPABILITY = NetworkServices
+}
+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)
index 0dc3aa7..3565978 100644 (file)
@@ -37,3 +37,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/network/torrent
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 3998cf5..ac88b99 100644 (file)
@@ -17,3 +17,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/2dpainting
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8a26573..d278785 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/framebufferobject2
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 7f5c3d6..e9f371b 100644 (file)
@@ -12,3 +12,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/grabber
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 1c67fe0..0c81aae 100644 (file)
@@ -17,3 +17,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 774bfef..d0e9531 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -25,3 +24,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 8016aa3..3714ae0 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -25,3 +24,15 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es2
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellogl_es2.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/hellogl_es2
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
+maemo5 {
+    # Debian package name may not contain numbers or special characters
+    # such as '_', lets change this in Maemo.
+    TARGET = helloglestwo
+    include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+}
+
+symbian: warning(This example might not fully work on Symbian platform)
+simulator: warning(This example might not fully work on Simulator platform)
index f9ca0bd..2a96807 100644 (file)
@@ -12,6 +12,7 @@ contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2){
     }
 } else {
     SUBDIRS   = 2dpainting \
+                cube \
                 grabber \
                 hellogl \
                 overpainting \
@@ -28,3 +29,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 31adf0f..6dfcf28 100644 (file)
@@ -20,4 +20,10 @@ sources.files = $$SOURCES \
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/overpainting
 INSTALLS += target \
     sources
+
 symbian:CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 79d5a6d..755ed8c 100644 (file)
@@ -16,4 +16,10 @@ sources.files = $$SOURCES \
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/pbuffers
 INSTALLS += target \
     sources
+
 symbian:CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 0fb75c1..d709818 100644 (file)
@@ -3,7 +3,6 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET =
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -21,3 +20,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/pbuffers2
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 3472073..a8938b9 100644 (file)
@@ -10,3 +10,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/samplebuffers
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example does not work on Maemo platform)
+simulator: warning(This example might not fully work on Simulator platform)
index 78555d5..5bb0d57 100644 (file)
@@ -13,3 +13,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/opengl/textures
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index ffbe81c..f8c982d 100644 (file)
@@ -6,3 +6,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/openvg
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS openvg.pro README
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/openvg
 INSTALLS += target sources
+
index e607721..41642e8 100644 (file)
@@ -15,3 +15,6 @@ symbian {
     TARGET.UID3 = 0xA000A649
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index 6662742..aa839f6 100644 (file)
@@ -48,6 +48,10 @@ int main(int argc, char *argv[])
 
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 54422a0..072c3e0 100644 (file)
@@ -74,7 +74,11 @@ Window::Window()
 //! [2]
     penWidthSpinBox = new QSpinBox;
     penWidthSpinBox->setRange(0, 20);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    penWidthSpinBox->setSpecialValueText(tr("0"));
+#else
     penWidthSpinBox->setSpecialValueText(tr("0 (cosmetic pen)"));
+#endif
 
     penWidthLabel = new QLabel(tr("Pen &Width:"));
     penWidthLabel->setBuddy(penWidthSpinBox);
@@ -134,12 +138,12 @@ Window::Window()
     brushStyleComboBox->addItem(tr("Dense 7"), Qt::Dense7Pattern);
     brushStyleComboBox->addItem(tr("None"), Qt::NoBrush);
 
-    brushStyleLabel = new QLabel(tr("&Brush Style:"));
+    brushStyleLabel = new QLabel(tr("&Brush:"));
     brushStyleLabel->setBuddy(brushStyleComboBox);
 //! [4]
 
 //! [5]
-    otherOptionsLabel = new QLabel(tr("Other Options:"));
+    otherOptionsLabel = new QLabel(tr("Options:"));
 //! [5] //! [6]
     antialiasingCheckBox = new QCheckBox(tr("&Antialiasing"));
 //! [6] //! [7]
@@ -168,26 +172,27 @@ Window::Window()
 //! [9]
     QGridLayout *mainLayout = new QGridLayout;
 //! [9] //! [10]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
+#endif
     mainLayout->setColumnStretch(0, 1);
     mainLayout->setColumnStretch(3, 1);
     mainLayout->addWidget(renderArea, 0, 0, 1, 4);
-    mainLayout->setRowMinimumHeight(1, 6);
-    mainLayout->addWidget(shapeLabel, 2, 1, Qt::AlignRight);
-    mainLayout->addWidget(shapeComboBox, 2, 2);
-    mainLayout->addWidget(penWidthLabel, 3, 1, Qt::AlignRight);
-    mainLayout->addWidget(penWidthSpinBox, 3, 2);
-    mainLayout->addWidget(penStyleLabel, 4, 1, Qt::AlignRight);
-    mainLayout->addWidget(penStyleComboBox, 4, 2);
-    mainLayout->addWidget(penCapLabel, 5, 1, Qt::AlignRight);
-    mainLayout->addWidget(penCapComboBox, 5, 2);
-    mainLayout->addWidget(penJoinLabel, 6, 1, Qt::AlignRight);
-    mainLayout->addWidget(penJoinComboBox, 6, 2);
-    mainLayout->addWidget(brushStyleLabel, 7, 1, Qt::AlignRight);
-    mainLayout->addWidget(brushStyleComboBox, 7, 2);
-    mainLayout->setRowMinimumHeight(8, 6);
-    mainLayout->addWidget(otherOptionsLabel, 9, 1, Qt::AlignRight);
-    mainLayout->addWidget(antialiasingCheckBox, 9, 2);
-    mainLayout->addWidget(transformationsCheckBox, 10, 2);
+    mainLayout->addWidget(shapeLabel, 2, 0, Qt::AlignRight);
+    mainLayout->addWidget(shapeComboBox, 2, 1);
+    mainLayout->addWidget(penWidthLabel, 3, 0, Qt::AlignRight);
+    mainLayout->addWidget(penWidthSpinBox, 3, 1);
+    mainLayout->addWidget(penStyleLabel, 4, 0, Qt::AlignRight);
+    mainLayout->addWidget(penStyleComboBox, 4, 1);
+    mainLayout->addWidget(penCapLabel, 3, 2, Qt::AlignRight);
+    mainLayout->addWidget(penCapComboBox, 3, 3);
+    mainLayout->addWidget(penJoinLabel, 2, 2, Qt::AlignRight);
+    mainLayout->addWidget(penJoinComboBox, 2, 3);
+    mainLayout->addWidget(brushStyleLabel, 4, 2, Qt::AlignRight);
+    mainLayout->addWidget(brushStyleComboBox, 4, 3);
+    mainLayout->addWidget(otherOptionsLabel, 5, 0, Qt::AlignRight);
+    mainLayout->addWidget(antialiasingCheckBox, 5, 1, 1, 1, Qt::AlignRight);
+    mainLayout->addWidget(transformationsCheckBox, 5, 2, 1, 2, Qt::AlignRight);
     setLayout(mainLayout);
 
     shapeChanged();
index f7e050b..731edc6 100644 (file)
@@ -14,3 +14,5 @@ symbian {
     TARGET.UID3 = 0xA000A64A
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index b9328a6..6d93d91 100644 (file)
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting/fontsampler
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 01c8ada..dffe803 100644 (file)
@@ -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();
 }
index 0976d1f..9669843 100644 (file)
@@ -47,6 +47,10 @@ MainWindow::MainWindow(QWidget *parent)
 {
     setupUi(this);
 
+#if defined(Q_OS_SYMBIAN)
+    addDockWidget(Qt::BottomDockWidgetArea, dockWidget);
+#endif
+
     sampleSizes << 32 << 24 << 16 << 14 << 12 << 8 << 4 << 2 << 1;
     markedCount = 0;
     setupFontTree();
@@ -140,7 +144,11 @@ void MainWindow::showFont(QTreeWidgetItem *item)
     QString oldText = textEdit->toPlainText().trimmed();
     bool modified = textEdit->document()->isModified();
     textEdit->clear();
+#if defined(Q_OS_SYMBIAN)
+    textEdit->document()->setDefaultFont(QFont(family, 10, weight, italic));
+#else
     textEdit->document()->setDefaultFont(QFont(family, 32, weight, italic));
+#endif
 
     QTextCursor cursor = textEdit->textCursor();
     QTextBlockFormat blockFormat;
@@ -217,6 +225,30 @@ void MainWindow::updateStyles(QTreeWidgetItem *item, int column)
     printPreviewAction->setEnabled(markedCount > 0);
 }
 
+QMap<QString, StyleItems> MainWindow::currentPageMap()
+{
+    QMap<QString, StyleItems> pageMap;
+
+    for (int row = 0; row < fontTree->topLevelItemCount(); ++row) {
+        QTreeWidgetItem *familyItem = fontTree->topLevelItem(row);
+        QString family;
+
+        if (familyItem->checkState(0) == Qt::Checked) {
+            family = familyItem->text(0);
+            pageMap[family] = StyleItems();
+        }
+
+        for (int childRow = 0; childRow < familyItem->childCount(); ++childRow) {
+            QTreeWidgetItem *styleItem = familyItem->child(childRow);
+            if (styleItem->checkState(0) == Qt::Checked)
+                pageMap[family].append(styleItem);
+        }
+    }
+
+    return pageMap;
+}
+
+#ifndef QT_NO_PRINTER
 void MainWindow::on_printAction_triggered()
 {
     pageMap = currentPageMap();
@@ -283,29 +315,6 @@ void MainWindow::on_printPreviewAction_triggered()
     preview.exec();
 }
 
-QMap<QString, StyleItems> MainWindow::currentPageMap()
-{
-    QMap<QString, StyleItems> pageMap;
-
-    for (int row = 0; row < fontTree->topLevelItemCount(); ++row) {
-        QTreeWidgetItem *familyItem = fontTree->topLevelItem(row);
-        QString family;
-
-        if (familyItem->checkState(0) == Qt::Checked) {
-            family = familyItem->text(0);
-            pageMap[family] = StyleItems();
-        }
-
-        for (int childRow = 0; childRow < familyItem->childCount(); ++childRow) {
-            QTreeWidgetItem *styleItem = familyItem->child(childRow);
-            if (styleItem->checkState(0) == Qt::Checked)
-                pageMap[family].append(styleItem);
-        }
-    }
-
-    return pageMap;
-}
-
 void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
 {
     QString family = pageMap.keys()[index];
@@ -370,3 +379,4 @@ void MainWindow::printPage(int index, QPainter *painter, QPrinter *printer)
 
     painter->restore();
 }
+#endif
index 7ea4cd5..4021ee7 100644 (file)
@@ -61,11 +61,15 @@ public:
 public slots:
     void on_clearAction_triggered();
     void on_markAction_triggered();
+#ifndef QT_NO_PRINTER
     void on_printAction_triggered();
     void on_printPreviewAction_triggered();
+#endif
     void on_unmarkAction_triggered();
+#ifndef QT_NO_PRINTER
     void printDocument(QPrinter *printer);
     void printPage(int index, QPainter *painter, QPrinter *printer);
+#endif
     void showFont(QTreeWidgetItem *item);
     void updateStyles(QTreeWidgetItem *item, int column);
 
index 6545b34..1a95ebd 100644 (file)
@@ -1,10 +1,8 @@
-<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>MainWindowBase</class>
- <widget class="QMainWindow" name="MainWindowBase" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="MainWindowBase">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>345</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Font Sampler</string>
   </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QVBoxLayout" >
-    <property name="margin" >
-     <number>9</number>
-    </property>
-    <property name="spacing" >
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QVBoxLayout">
+    <property name="spacing">
      <number>6</number>
     </property>
+    <property name="margin">
+     <number>9</number>
+    </property>
     <item>
-     <widget class="QTextEdit" name="textEdit" />
+     <widget class="QTextEdit" name="textEdit"/>
     </item>
    </layout>
   </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
      <width>800</width>
-     <height>24</height>
+     <height>18</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menu_Selection" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_Selection">
+    <property name="title">
      <string>&amp;Selection</string>
     </property>
-    <addaction name="markAction" />
-    <addaction name="unmarkAction" />
-    <addaction name="clearAction" />
+    <addaction name="markAction"/>
+    <addaction name="unmarkAction"/>
+    <addaction name="clearAction"/>
    </widget>
-   <widget class="QMenu" name="menu_File" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
      <string>&amp;File</string>
     </property>
-    <addaction name="printPreviewAction" />
-    <addaction name="printAction" />
-    <addaction name="quitAction" />
+    <addaction name="printPreviewAction"/>
+    <addaction name="printAction"/>
+    <addaction name="quitAction"/>
    </widget>
-   <addaction name="menu_File" />
-   <addaction name="menu_Selection" />
+   <addaction name="menu_File"/>
+   <addaction name="menu_Selection"/>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <widget class="QDockWidget" name="dockWidget" >
-   <property name="features" >
-    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable|QDockWidget::NoDockWidgetFeatures</set>
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QDockWidget" name="dockWidget">
+   <property name="features">
+    <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
    </property>
-   <property name="windowTitle" >
+   <property name="windowTitle">
     <string>Available Fonts</string>
    </property>
-   <attribute name="dockWidgetArea" >
+   <attribute name="dockWidgetArea">
     <number>1</number>
    </attribute>
-   <widget class="QWidget" name="dockWidgetContents" >
-    <layout class="QVBoxLayout" >
-     <property name="margin" >
-      <number>9</number>
-     </property>
-     <property name="spacing" >
+   <widget class="QWidget" name="dockWidgetContents">
+    <layout class="QVBoxLayout">
+     <property name="spacing">
       <number>6</number>
      </property>
+     <property name="margin">
+      <number>9</number>
+     </property>
      <item>
-      <widget class="QTreeWidget" name="fontTree" >
-       <property name="selectionMode" >
+      <widget class="QTreeWidget" name="fontTree">
+       <property name="selectionMode">
         <enum>QAbstractItemView::ExtendedSelection</enum>
        </property>
+       <column>
+        <property name="text">
+         <string notr="true">1</string>
+        </property>
+       </column>
       </widget>
      </item>
     </layout>
    </widget>
   </widget>
-  <action name="printAction" >
-   <property name="enabled" >
+  <action name="printAction">
+   <property name="enabled">
     <bool>false</bool>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>&amp;Print...</string>
    </property>
-   <property name="shortcut" >
+   <property name="shortcut">
     <string>Ctrl+P</string>
    </property>
   </action>
-  <action name="quitAction" >
-   <property name="text" >
+  <action name="quitAction">
+   <property name="text">
     <string>E&amp;xit</string>
    </property>
-   <property name="shortcut" >
+   <property name="shortcut">
     <string>Ctrl+Q</string>
    </property>
   </action>
-  <action name="markAction" >
-   <property name="text" >
+  <action name="markAction">
+   <property name="text">
     <string>&amp;Mark</string>
    </property>
-   <property name="shortcut" >
+   <property name="shortcut">
     <string>Ctrl+M</string>
    </property>
   </action>
-  <action name="unmarkAction" >
-   <property name="text" >
+  <action name="unmarkAction">
+   <property name="text">
     <string>&amp;Unmark</string>
    </property>
-   <property name="shortcut" >
+   <property name="shortcut">
     <string>Ctrl+U</string>
    </property>
   </action>
-  <action name="clearAction" >
-   <property name="text" >
+  <action name="clearAction">
+   <property name="text">
     <string>&amp;Clear</string>
    </property>
   </action>
-  <action name="printPreviewAction" >
-   <property name="enabled" >
+  <action name="printPreviewAction">
+   <property name="enabled">
     <bool>false</bool>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Print Preview...</string>
    </property>
   </action>
  </widget>
- <pixmapfunction></pixmapfunction>
  <resources/>
  <connections/>
 </ui>
index a41f405..9488204 100644 (file)
 #include "imagecomposer.h"
 
 //! [0]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+static const QSize resultSize(50, 50);
+#else
 static const QSize resultSize(200, 200);
+#endif
 //! [0]
 
 //! [1]
@@ -104,7 +108,10 @@ ImageComposer::ImageComposer()
     mainLayout->addWidget(destinationButton, 0, 2, 3, 1);
     mainLayout->addWidget(equalLabel, 1, 3);
     mainLayout->addWidget(resultLabel, 0, 4, 3, 1);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+#else
     mainLayout->setSizeConstraint(QLayout::SetFixedSize);
+#endif
     setLayout(mainLayout);
 //! [4]
 
@@ -176,6 +183,9 @@ void ImageComposer::loadImage(const QString &fileName, QImage *image,
 {
     image->load(fileName);
 
+    // Scale the image to given size
+    *image = image->scaled(resultSize, Qt::KeepAspectRatio);
+
     QImage fixedImage(resultSize, QImage::Format_ARGB32_Premultiplied);
     QPainter painter(&fixedImage);
     painter.setCompositionMode(QPainter::CompositionMode_Source);
index e8be8fa..a763108 100644 (file)
@@ -13,3 +13,5 @@ symbian {
     TARGET.UID3 = 0xA000A64B
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index e70fa5f..f97a3ff 100644 (file)
@@ -49,7 +49,11 @@ int main(int argc, char *argv[])
 
     QApplication app(argc, argv);
     ImageComposer composer;
+#if defined(Q_OS_SYMBIAN)
+    composer.showMaximized();
+#else
     composer.show();
+#endif
     return app.exec();
 }
 //! [0]
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 84bbeca..2a7d224 100644 (file)
@@ -15,3 +15,5 @@ symbian {
     TARGET.UID3 = 0xA000A64C
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 429f470..0a4c1b0 100644 (file)
@@ -130,16 +130,17 @@ Window::Window()
 //! [9]
 
 //! [10]
-    renderAreas[0] = new RenderArea(rectPath);
-    renderAreas[1] = new RenderArea(roundRectPath);
-    renderAreas[2] = new RenderArea(ellipsePath);
-    renderAreas[3] = new RenderArea(piePath);
-    renderAreas[4] = new RenderArea(polygonPath);
-    renderAreas[5] = new RenderArea(groupPath);
-    renderAreas[6] = new RenderArea(textPath);
-    renderAreas[7] = new RenderArea(bezierPath);
-    renderAreas[8] = new RenderArea(starPath);
-    Q_ASSERT(NumRenderAreas == 9);
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
+    renderAreas.push_back(new RenderArea(rectPath));
+    renderAreas.push_back(new RenderArea(roundRectPath));
+    renderAreas.push_back(new RenderArea(ellipsePath));
+    renderAreas.push_back(new RenderArea(piePath));
+    renderAreas.push_back(new RenderArea(polygonPath));
+    renderAreas.push_back(new RenderArea(groupPath));
+#endif
+    renderAreas.push_back(new RenderArea(textPath));
+    renderAreas.push_back(new RenderArea(bezierPath));
+    renderAreas.push_back(new RenderArea(starPath));
 //! [10]
 
 //! [11]
@@ -201,19 +202,27 @@ Window::Window()
     connect(penColorComboBox, SIGNAL(activated(int)),
             this, SLOT(penColorChanged()));
 
-    for (int i = 0; i < NumRenderAreas; ++i) {
+    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++) {
         connect(penWidthSpinBox, SIGNAL(valueChanged(int)),
-                renderAreas[i], SLOT(setPenWidth(int)));
+                *it, SLOT(setPenWidth(int)));
         connect(rotationAngleSpinBox, SIGNAL(valueChanged(int)),
-                renderAreas[i], SLOT(setRotationAngle(int)));
+                *it, SLOT(setRotationAngle(int)));
     }
 
 //! [16] //! [17]
     QGridLayout *topLayout = new QGridLayout;
-    for (int i = 0; i < NumRenderAreas; ++i)
-        topLayout->addWidget(renderAreas[i], i / 3, i % 3);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    topLayout->setSizeConstraint(QLayout::SetNoConstraint);
+#endif
+
+    int i=0;
+    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++, i++)
+        topLayout->addWidget(*it, i / 3, i % 3);
 
     QGridLayout *mainLayout = new QGridLayout;
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
+#endif
     mainLayout->addLayout(topLayout, 0, 0, 1, 4);
     mainLayout->addWidget(fillRuleLabel, 1, 0);
     mainLayout->addWidget(fillRuleComboBox, 1, 1, 1, 3);
@@ -225,8 +234,10 @@ Window::Window()
     mainLayout->addWidget(penWidthSpinBox, 3, 1, 1, 3);
     mainLayout->addWidget(penColorLabel, 4, 0);
     mainLayout->addWidget(penColorComboBox, 4, 1, 1, 3);
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
     mainLayout->addWidget(rotationAngleLabel, 5, 0);
     mainLayout->addWidget(rotationAngleSpinBox, 5, 1, 1, 3);
+#endif
     setLayout(mainLayout);
 //! [17]
 
@@ -245,8 +256,8 @@ void Window::fillRuleChanged()
 {
     Qt::FillRule rule = (Qt::FillRule)currentItemData(fillRuleComboBox).toInt();
 
-    for (int i = 0; i < NumRenderAreas; ++i)
-        renderAreas[i]->setFillRule(rule);
+    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++)
+        (*it)->setFillRule(rule);
 }
 //! [19]
 
@@ -256,8 +267,8 @@ void Window::fillGradientChanged()
     QColor color1 = qvariant_cast<QColor>(currentItemData(fillColor1ComboBox));
     QColor color2 = qvariant_cast<QColor>(currentItemData(fillColor2ComboBox));
 
-    for (int i = 0; i < NumRenderAreas; ++i)
-        renderAreas[i]->setFillGradient(color1, color2);
+    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++)
+        (*it)->setFillGradient(color1, color2);
 }
 //! [20]
 
@@ -266,8 +277,8 @@ void Window::penColorChanged()
 {
     QColor color = qvariant_cast<QColor>(currentItemData(penColorComboBox));
 
-    for (int i = 0; i < NumRenderAreas; ++i)
-        renderAreas[i]->setPenColor(color);
+    for(QList<RenderArea*>::iterator it = renderAreas.begin(); it != renderAreas.end(); it++)
+        (*it)->setPenColor(color);
 }
 //! [21]
 
index 4891fdd..b95cd93 100644 (file)
@@ -71,9 +71,7 @@ private:
 //! [1]
 
 //! [2]
-    enum { NumRenderAreas = 9 };
-
-    RenderArea *renderAreas[NumRenderAreas];
+    QList<RenderArea*> renderAreas;
     QLabel *fillRuleLabel;
     QLabel *fillGradientLabel;
     QLabel *fillToLabel;
index 4108a64..41f9182 100644 (file)
@@ -3,9 +3,8 @@ SUBDIRS       = basicdrawing \
                 concentriccircles \
                 imagecomposition \
                 painterpaths \
-                transformations
-
-!wince*:!symbian: SUBDIRS += fontsampler
+                transformations \
+                fontsampler
 
 # install
 target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting
@@ -14,3 +13,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 8fe8be9..0107046 100644 (file)
@@ -14,3 +14,8 @@ symbian {
     TARGET.UID3 = 0xA000A64D
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index f6c029b..cb87d71 100644 (file)
@@ -15,3 +15,6 @@ INSTALLS += target sources
 symbian: CONFIG += qt_example
 
 wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example does not work on Simulator platform)
index de64116..d6ca7e5 100644 (file)
@@ -48,16 +48,33 @@ int main(int argc, char *argv[])
     QApplication app(argc,argv);
 
     Images imageView;
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    imageView.showMaximized();
+#else
     imageView.show();
+#endif
 
     return app.exec();
 }
 
 #else
 
-int main()
+int main(int argc, char *argv[])
 {
-    qDebug() << "Qt Concurrent is not supported on this platform";
+    QApplication app(argc, argv);
+    QString text("Qt Concurrent is not supported on this platform");
+
+    QLabel *label = new QLabel(text);
+    label->setWordWrap(true);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    label->showMaximized();
+#else
+    label->show();
+#endif
+    qDebug() << text;
+
+    app.exec();
 }
 
 #endif
index bb6c5c6..76b1447 100644 (file)
@@ -73,9 +73,24 @@ int main(int argc, char *argv[])
 
 #else
 
-int main()
+#include <QLabel>
+
+int main(int argc, char *argv[])
 {
-       qDebug() << "Qt Concurrent is not yet supported on this platform";
+    QApplication app(argc, argv);
+    QString text("Qt Concurrent is not yet supported on this platform");
+
+    QLabel *label = new QLabel(text);
+    label->setWordWrap(true);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    label->showMaximized();
+#else
+    label->show();
+#endif
+    qDebug() << text;
+
+    app.exec();
 }
 
 #endif
index da8b5cb..715df39 100644 (file)
@@ -14,3 +14,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/map
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
index 307baed..d302366 100644 (file)
@@ -90,9 +90,22 @@ int main(int argc, char **argv)
 
 #else
 
-int main()
+int main(int argc, char *argv[])
 {
-       qDebug() << "Qt Concurrent is not yet supported on this platform";
+    QApplication app(argc, argv);
+    QString text("Qt Concurrent is not yet supported on this platform");
+
+    QLabel *label = new QLabel(text);
+    label->setWordWrap(true);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    label->showMaximized();
+#else
+    label->show();
+#endif
+    qDebug() << text;
+
+    app.exec();
 }
 
 #endif
index be3e62c..afeadd4 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET += 
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -14,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/progressdialog
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
index a224b4a..0d5d0c5 100644 (file)
@@ -15,3 +15,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 1e448bb..86fdf80 100644 (file)
@@ -64,9 +64,24 @@ int main(int argc, char **argv)
 
 #else
 
-int main()
+#include <QLabel>
+
+int main(int argc, char *argv[])
 {
-       qDebug() << "Qt Concurrent is not yet supported on this platform";
+    QApplication app(argc, argv);
+    QString text("Qt Concurrent is not yet supported on this platform");
+
+    QLabel *label = new QLabel(text);
+    label->setWordWrap(true);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    label->showMaximized();
+#else
+    label->show();
+#endif
+    qDebug() << text;
+
+    app.exec();
 }
 
 #endif
index f5b359c..ae87ffe 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET += 
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -14,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/runfunction
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
index 035207c..56be795 100644 (file)
@@ -124,7 +124,11 @@ int main(int argc, char** argv)
 {
     QApplication app(argc, argv);
     qDebug() << "finding files...";
+#ifdef Q_WS_MAEMO_5
+    QStringList files = findFiles("/usr/", QStringList() << "*.sh");
+#else
     QStringList files = findFiles("../../", QStringList() << "*.cpp" << "*.h");
+#endif
     qDebug() << files.count() << "files";
 
     qDebug() << "warmup";
@@ -158,9 +162,24 @@ int main(int argc, char** argv)
 
 #else
 
-int main()
+#include <QLabel>
+
+int main(int argc, char *argv[])
 {
-       qDebug() << "Qt Concurrent is not yet supported on this platform";
+    QApplication app(argc, argv);
+    QString text("Qt Concurrent is not yet supported on this platform");
+
+    QLabel *label = new QLabel(text);
+    label->setWordWrap(true);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+    label->showMaximized();
+#else
+    label->show();
+#endif
+    qDebug() << text;
+
+    app.exec();
 }
 
 #endif
index c6e4d85..1596e9c 100644 (file)
@@ -1,5 +1,4 @@
 TEMPLATE = app
-TARGET += 
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -14,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtconcurrent/wordcount
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
index 7fce596..a1331bb 100644 (file)
@@ -8,3 +8,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qtestlib
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 439e840..fdbf2fc 100644 (file)
@@ -11,3 +11,8 @@ symbian {
     TARGET.UID3 = 0xA000C60B
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 2c44466..647ddd7 100644 (file)
@@ -11,3 +11,8 @@ symbian {
     TARGET.UID3 = 0xA000C60C
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index ec24447..887fc9a 100644 (file)
@@ -11,3 +11,8 @@ symbian {
     TARGET.UID3 = 0xA000C60D
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index ca3985e..082a3a3 100644 (file)
@@ -11,3 +11,8 @@ symbian {
     TARGET.UID3 = 0xA000C60E
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index c263a74..4f70284 100644 (file)
@@ -11,3 +11,8 @@ symbian {
     TARGET.UID3 = 0xA000C60F
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 172a02a..faa0526 100644 (file)
@@ -9,3 +9,7 @@ HEADERS     = dbscreen.h
 SOURCES     = dbscreendriverplugin.cpp \
               dbscreen.cpp 
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 098a97e..65dc715 100644 (file)
@@ -9,3 +9,9 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/framebuffer
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS framebuffer.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/framebuffer
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 878aff2..d58f9fd 100644 (file)
@@ -9,3 +9,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/mousecalibration
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/mousecalibration
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
+simulator: warning(This example does not work on Simulator platform)
index 2a4e0be..c452e1e 100644 (file)
@@ -10,3 +10,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/simpledecoration
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/simpledecoration
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
+simulator: warning(This example does not work on Simulator platform)
index 8a47c1d..8bc5395 100644 (file)
@@ -17,3 +17,9 @@ SOURCES       = svgalibscreen.cpp \
           svgalibpaintdevice.cpp \
           svgalibplugin.cpp
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
+simulator: warning(This example does not work on Simulator platform)
index 7ecc8ab..834b2c1 100644 (file)
@@ -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
index b23e883..9c1141f 100644 (file)
@@ -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();
 }
index 5117c03..60d7c51 100644 (file)
@@ -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);
index 9aa8535..b12de14 100644 (file)
@@ -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);
 }
index 3ad32b8..a89aa76 100644 (file)
@@ -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();
 }
index 6760dad..a455500 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/orderform
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 102181e..c9ed843 100644 (file)
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index eecfb12..e0e5e4f 100644 (file)
@@ -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();
 }
index e981a91..93305ee 100644 (file)
@@ -17,3 +17,5 @@ wince*: {
    addFiles.path = .
    DEPLOYMENT += addFiles
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 0b015fd..a51dc95 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/cachedtable
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 26ddc42..ecbf565 100644 (file)
@@ -51,7 +51,11 @@ int main(int argc, char *argv[])
         return 1;
 
     TableEditor editor("person");
+#if defined(Q_OS_SYMBIAN)
+    editor.showMaximized();
+#else
     editor.show();
-    return editor.exec();
+#endif
+    return app.exec();
 }
 //! [0]
index 216f729..083e5ab 100644 (file)
@@ -45,7 +45,7 @@
 
 //! [0]
 TableEditor::TableEditor(const QString &tableName, QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     model = new QSqlTableModel(this);
     model->setTable(tableName);
@@ -59,6 +59,7 @@ TableEditor::TableEditor(const QString &tableName, QWidget *parent)
 //! [0] //! [1]
     QTableView *view = new QTableView;
     view->setModel(model);
+    view->resizeColumnsToContents();
 //! [1]
 
 //! [2]
index 14d9986..f13bd3d 100644 (file)
@@ -50,7 +50,7 @@ class QSqlTableModel;
 QT_END_NAMESPACE
 
 //! [0]
-class TableEditor : public QDialog
+class TableEditor : public QWidget
 {
     Q_OBJECT
 
index 6448e43..460d4e7 100644 (file)
@@ -19,3 +19,6 @@ symbian {
     TARGET.UID3 = 0xA000C612
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index 3f43a59..351b98d 100644 (file)
@@ -96,7 +96,11 @@ InformationWindow::InformationWindow(int id, QSqlRelationalTableModel *offices,
     locationId = id;
     displayedImage = imageFileEditor->currentText();
 
-    setWindowFlags(Qt::Window);
+    // Commented the following line. Now the window will look like dialog and the Qt will place the QDialogBox buttons to menu area in Symbian.
+    // Too bad that the revert button is missing, Should the Qt place the buttons under Option menu in the menu area?!
+    // If the Qt::Window flag was used, the background of window is white in symbian and the QLabels can't be regognized from the background.
+
+    //setWindowFlags(Qt::Window);
     enableButtons(false);
     setWindowTitle(tr("Office: %1").arg(locationText->text()));
 }
index e3c8fa7..9bfa57c 100644 (file)
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
 #ifndef Q_OS_SYMBIAN
     view.show();
 #else
-    view.showFullScreen();
+    view.showMaximized();
 #endif
 #ifdef QT_KEYPAD_NAVIGATION
     QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
index 68fe06a..883b28b 100644 (file)
@@ -62,7 +62,7 @@ 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
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
     setMinimumSize(470, 620);
     setMaximumSize(470, 620);
 #else
index fe3dd9d..55151eb 100644 (file)
@@ -54,6 +54,10 @@ int main(int argc, char *argv[])
 
     QFile *albumDetails = new QFile("albumdetails.xml");
     MainWindow window("artists", "albums", albumDetails);
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 24771ba..522ee6c 100644 (file)
@@ -77,8 +77,10 @@ MainWindow::MainWindow(const QString &artistTable, const QString &albumTable,
     layout->addWidget(artists, 0, 0);
     layout->addWidget(albums, 1, 0);
     layout->addWidget(details, 0, 1, 2, 1);
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
     layout->setColumnStretch(1, 1);
     layout->setColumnMinimumWidth(0, 500);
+#endif
 
     QWidget *widget = new QWidget;
     widget->setLayout(layout);
@@ -86,7 +88,9 @@ MainWindow::MainWindow(const QString &artistTable, const QString &albumTable,
     createMenuBar();
 
     showImageLabel();
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
     resize(850, 400);
+#endif
     setWindowTitle(tr("Music Archive"));
 }
 
index 98bfac4..68485f7 100644 (file)
@@ -19,3 +19,8 @@ symbian {
     TARGET.UID3 = 0xA000D7CF
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index b6507e9..ac1a33f 100644 (file)
@@ -52,16 +52,23 @@ void initializeModel(QSqlQueryModel *model)
     model->setHeaderData(2, Qt::Horizontal, QObject::tr("Last name"));
 }
 
-void createView(const QString &title, QSqlQueryModel *model)
+QTableView* createView(QSqlQueryModel *model, const QString &title = "")
 {
-    static int offset = 0;
-
     QTableView *view = new QTableView;
     view->setModel(model);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    Q_UNUSED(title);
+    view->resizeColumnsToContents();
+#else
+    static int offset = 0;
+
     view->setWindowTitle(title);
     view->move(100 + offset, 100 + offset);
     offset += 20;
     view->show();
+#endif
+
+    return view;
 }
 
 int main(int argc, char *argv[])
@@ -78,9 +85,17 @@ int main(int argc, char *argv[])
     initializeModel(&editableModel);
     initializeModel(&customModel);
 
-    createView(QObject::tr("Plain Query Model"), &plainModel);
-    createView(QObject::tr("Editable Query Model"), &editableModel);
-    createView(QObject::tr("Custom Query Model"), &customModel);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    QTabWidget *tabWidget = new QTabWidget;
+    tabWidget->addTab(createView(&plainModel), QObject::tr("Plain"));
+    tabWidget->addTab(createView(&editableModel), QObject::tr("Editable"));
+    tabWidget->addTab(createView(&customModel), QObject::tr("Custom"));
+    tabWidget->showMaximized();
+#else
+    createView(&plainModel, QObject::tr("Plain Query Model"));
+    createView(&editableModel, QObject::tr("Editable Query Model"));
+    createView(&customModel, QObject::tr("Custom Query Model"));
+#endif
 
     return app.exec();
 }
index f376e12..8b99231 100644 (file)
@@ -13,3 +13,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/querymodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index ecb985e..8b8ceff 100644 (file)
@@ -108,7 +108,11 @@ int main(int argc, char *argv[])
     initializeModel(&model);
 
     QTableView *view = createView(QObject::tr("Relational Table Model"), &model);
+#if defined(Q_OS_SYMBIAN)
+    view->showMaximized();
+#else
     view->show();
+#endif
 
     return app.exec();
 }
index 41c1c17..a85bc0f 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/relationaltablemodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 36738fb..56e4f89 100644 (file)
@@ -18,3 +18,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql
 INSTALLS += sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 41e756d..9e45ede 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char **argv)
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 6005318..65b058e 100644 (file)
@@ -11,3 +11,6 @@ INSTALLS += target sources
 
 wince*: DEPLOYMENT_PLUGIN += qsqlite
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 41a42bc..a107da0 100644 (file)
@@ -54,11 +54,15 @@ void initializeModel(QSqlTableModel *model)
     model->setHeaderData(2, Qt::Horizontal, QObject::tr("Last name"));
 }
 
-QTableView *createView(const QString &title, QSqlTableModel *model)
+QTableView *createView(QSqlTableModel *model, const QString &title = "")
 {
     QTableView *view = new QTableView;
     view->setModel(model);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    Q_UNUSED(title)
+#else
     view->setWindowTitle(title);
+#endif
     return view;
 }
 
@@ -72,12 +76,20 @@ int main(int argc, char *argv[])
 
     initializeModel(&model);
 
-    QTableView *view1 = createView(QObject::tr("Table Model (View 1)"), &model);
-    QTableView *view2 = createView(QObject::tr("Table Model (View 2)"), &model);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    QTabWidget *tabWidget = new QTabWidget;
+    tabWidget->addTab(createView(&model), "View 1");
+    tabWidget->addTab(createView(&model), "View 2");
+
+    tabWidget->showMaximized();
+#else
+    QTableView *view1 = createView(&model, QObject::tr("Table Model (View 1)"));
+    QTableView *view2 = createView(&model, QObject::tr("Table Model (View 2)"));
 
     view1->show();
     view2->move(view1->x() + view1->width() + 20, view1->y());
     view2->show();
+#endif
 
     return app.exec();
 }
index 41280ee..273a428 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/tablemodel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 646c90a..8b77bb2 100644 (file)
@@ -5,3 +5,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS eventtransitions.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
index 5391057..5c0eb82 100644 (file)
@@ -48,7 +48,12 @@ public:
         : QWidget(parent)
     {
         QPushButton *button = new QPushButton(this);
-        button->setGeometry(QRect(100, 100, 100, 100));
+        button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+
+        QVBoxLayout *layout = new QVBoxLayout;
+        layout->addWidget(button);
+        layout->setContentsMargins(80, 80, 80, 80);
+        setLayout(layout);
 //! [0]
 
 //! [1]
@@ -103,7 +108,11 @@ int main(int argc, char **argv)
     QApplication app(argc, argv);
     Window window;
     window.resize(300, 300);
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
 
     return app.exec();
 }
index 4291d43..012e175 100644 (file)
@@ -9,3 +9,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/factorial
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS factorial.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/factorial
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
index 9d2b17f..9ee782c 100644 (file)
@@ -9,3 +9,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/pingpong
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS pingpong.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/pingpong
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
index 71c2c69..dc8783c 100644 (file)
@@ -47,7 +47,11 @@ int main(int argv, char **args)
     QApplication app(argv, args);
 
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
 
     return app.exec();
 }
index 1153b75..be15e38 100644 (file)
@@ -68,7 +68,8 @@ protected:
             int key = keyEvent->key();
 
             return key == Qt::Key_2 || key == Qt::Key_8 || key == Qt::Key_6 ||
-                   key == Qt::Key_4;
+                   key == Qt::Key_4 || key == Qt::Key_Down || key == Qt::Key_Up ||
+                   key == Qt::Key_Right || key == Qt::Key_Left;
         }
         return false;
     }
@@ -81,15 +82,19 @@ protected:
 
         int key = keyEvent->key();
         switch (key) {
+            case Qt::Key_Left:
             case Qt::Key_4:
                 window->movePlayer(Window::Left);
                 break;
+            case Qt::Key_Up:
             case Qt::Key_8:
                 window->movePlayer(Window::Up);
                 break;
+            case Qt::Key_Right:
             case Qt::Key_6:
                 window->movePlayer(Window::Right);
                 break;
+            case Qt::Key_Down:
             case Qt::Key_2:
                 window->movePlayer(Window::Down);
                 break;
index 6ab613b..c4fcfe9 100644 (file)
@@ -9,3 +9,6 @@ sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/rogue
 INSTALLS += target sources
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 39f5aa6..f40b7a0 100644 (file)
@@ -52,16 +52,22 @@ Window::Window()
 
     QFontDatabase database;
     QFont font;
-    if (database.families().contains("Monospace"))
-        font = QFont("Monospace", 12);
+    if (database.families().contains("Monospace")) {
+        font = QFont("Monospace");
+    }
     else {
         foreach (QString family, database.families()) {
             if (database.isFixedPitch(family)) {
-                font = QFont(family, 12);
+                font = QFont(family);
                 break;
             }
         }
     }
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+    font.setPointSize(5);
+#else
+    font.setPointSize(12);
+#endif
     setFont(font);
 
 //![1]
index 025ec79..bdadad4 100644 (file)
@@ -49,8 +49,13 @@ class QStateMachine;
 class QTransition;
 QT_END_NAMESPACE
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+#define WIDTH 43
+#define HEIGHT 14
+#else
 #define WIDTH 35
 #define HEIGHT 20
+#endif
 
 //![0]
 class Window : public QWidget
index 23cd348..c20e059 100644 (file)
@@ -88,6 +88,9 @@ public:
         : QWidget(parent)
     {
         QVBoxLayout *vbox = new QVBoxLayout(this);
+#ifdef Q_WS_MAEMO_5
+        vbox->setContentsMargins(320, 0, 320, 0);
+#endif
         m_red = new LightWidget(Qt::red);
         vbox->addWidget(m_red);
         m_yellow = new LightWidget(Qt::yellow);
@@ -174,8 +177,14 @@ int main(int argc, char **argv)
     QApplication app(argc, argv);
 
     TrafficLight widget;
+#if defined(Q_OS_SYMBIAN)
+    widget.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    widget.show();
+#else
     widget.resize(110, 300);
     widget.show();
+#endif
 
     return app.exec();
 }
index f6aab8d..4b77bcb 100644 (file)
@@ -5,3 +5,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/trafficlight
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS trafficlight.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/trafficlight
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 6b9ce1f..47343ce 100644 (file)
@@ -74,8 +74,14 @@ int main(int argc, char **argv)
 //! [4]
 
 //! [5]
+#if defined(Q_OS_SYMBIAN)
+    button.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    button.show();
+#else
     button.resize(100, 50);
     button.show();
+#endif
     return app.exec();
 }
 //! [5]
index 212ba50..d9d8941 100644 (file)
@@ -5,3 +5,7 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/twowaybutton
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS twowaybutton.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/twowaybutton
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 610534d..5211c20 100644 (file)
@@ -47,7 +47,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     MandelbrotWidget widget;
+#if defined(Q_WS_S60)
+    widget.showMaximized();
+#else
     widget.show();
+#endif
     return app.exec();
 }
 //! [0]
index fe72cd5..d0fb499 100644 (file)
@@ -13,3 +13,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/mandelbrot
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 8dc1f5d..47eb473 100644 (file)
@@ -44,6 +44,7 @@
 
 #include "mandelbrotwidget.h"
 
+
 //! [0]
 const double DefaultCenterX = -0.637011f;
 const double DefaultCenterY = -0.0395159f;
@@ -72,6 +73,21 @@ MandelbrotWidget::MandelbrotWidget(QWidget *parent)
     setCursor(Qt::CrossCursor);
 #endif
     resize(550, 400);
+
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    ZoomButton *zoomIn = new ZoomButton(tr("Zoom In"), ZoomInFactor, this);
+    ZoomButton *zoomOut = new ZoomButton(tr("Zoom Out"), ZoomOutFactor, this);
+
+    QGridLayout *layout = new QGridLayout(this);
+    layout->addWidget(zoomIn, 0, 1);
+    layout->addWidget(zoomOut, 1, 1);
+    layout->setColumnStretch(0, 10);
+    layout->setRowStretch(2, 10);
+    setLayout(layout);
+
+    connect(zoomIn, SIGNAL(zoom(double)), this, SLOT(zoom(double)));
+    connect(zoomOut, SIGNAL(zoom(double)), this, SLOT(zoom(double)));
+#endif
 }
 //! [1]
 
@@ -113,6 +129,7 @@ void MandelbrotWidget::paintEvent(QPaintEvent * /* event */)
     }
 //! [8] //! [9]
 
+#if !defined(Q_WS_S60) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR)
     QString text = tr("Use mouse wheel or the '+' and '-' keys to zoom. "
                       "Press and hold left mouse button to scroll.");
     QFontMetrics metrics = painter.fontMetrics();
@@ -125,6 +142,7 @@ void MandelbrotWidget::paintEvent(QPaintEvent * /* event */)
     painter.setPen(Qt::white);
     painter.drawText((width() - textWidth) / 2,
                      metrics.leading() + metrics.ascent(), text);
+#endif
 }
 //! [9]
 
index 5af3a8d..53bbeb6 100644 (file)
 
 #include <QPixmap>
 #include <QWidget>
-
 #include "renderthread.h"
 
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+#include <QPushButton>
+
+class ZoomButton : public QPushButton
+{
+    Q_OBJECT
+public:
+    ZoomButton(const QString &text, double zoomFactor, QWidget *parent = NULL)
+        : QPushButton(text, parent), m_ZoomFactor(zoomFactor)
+    {
+        connect(this, SIGNAL(clicked()), this, SLOT(handleClick()));
+    }
+
+signals:
+    void zoom(double zoomFactor);
+
+private slots:
+    void handleClick()
+    {
+        emit zoom(m_ZoomFactor);
+    }
+
+private:
+    const double m_ZoomFactor;
+};
+#endif
+
 //! [0]
 class MandelbrotWidget : public QWidget
 {
@@ -65,9 +91,9 @@ protected:
 
 private slots:
     void updatePixmap(const QImage &image, double scaleFactor);
+    void zoom(double zoomFactor);
 
 private:
-    void zoom(double zoomFactor);
     void scroll(int deltaX, int deltaY);
 
     RenderThread thread;
index d70a88a..356352a 100644 (file)
@@ -119,7 +119,11 @@ int main(int argc, char *argv[])
     qsrand(QTime::currentTime().elapsed());
 
     Window window;
+#if defined(Q_WS_S60)
+    window.showMaximized();
+#else
     window.show();
+#endif
 
     window.loadImage(createImage(256, 256));
 //! [main finish]
index 6f39121..9c93578 100644 (file)
@@ -5,3 +5,13 @@ SOURCES   = main.cpp \
             block.cpp \
             renderthread.cpp \
             window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mandelbrot.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/threads/mandelbrot
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 88630de..3632895 100644 (file)
 **
 ****************************************************************************/
 
-#include <QtCore>
+#include <QtGui>
 
 #include <stdio.h>
 #include <stdlib.h>
 
 //! [0]
+#ifdef Q_WS_S60
+const int DataSize = 300;
+#else
 const int DataSize = 100000;
+#endif
+
 const int BufferSize = 8192;
 char buffer[BufferSize];
 
@@ -57,43 +62,70 @@ class Producer : public QThread
 //! [1] //! [2]
 {
 public:
-    void run();
-};
-
-void Producer::run()
-{
-    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
-    for (int i = 0; i < DataSize; ++i) {
-        freeBytes.acquire();
-        buffer[i % BufferSize] = "ACGT"[(int)qrand() % 4];
-        usedBytes.release();
+    void run()
+    {
+        qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+        for (int i = 0; i < DataSize; ++i) {
+            freeBytes.acquire();
+            buffer[i % BufferSize] = "ACGT"[(int)qrand() % 4];
+            usedBytes.release();
+        }
     }
-}
+};
 //! [2]
 
 //! [3]
 class Consumer : public QThread
 //! [3] //! [4]
 {
+    Q_OBJECT
 public:
-    void run();
-};
-
-void Consumer::run()
-{
-    for (int i = 0; i < DataSize; ++i) {
-        usedBytes.acquire();
-        fprintf(stderr, "%c", buffer[i % BufferSize]);
-        freeBytes.release();
+    void run()
+    {
+        for (int i = 0; i < DataSize; ++i) {
+            usedBytes.acquire();
+    #ifdef Q_WS_S60
+            QString text(buffer[i % BufferSize]);
+            freeBytes.release();
+            emit stringConsumed(text);
+    #else
+            fprintf(stderr, "%c", buffer[i % BufferSize]);
+            freeBytes.release();
+    #endif
+        }
+        fprintf(stderr, "\n");
     }
-    fprintf(stderr, "\n");
-}
+
+signals:
+    void stringConsumed(const QString &text);
+
+protected:
+    bool finish;
+};
 //! [4]
 
 //! [5]
 int main(int argc, char *argv[])
 //! [5] //! [6]
 {
+#ifdef Q_WS_S60
+    // Self made console for Symbian
+    QApplication app(argc, argv);
+    QPlainTextEdit console;
+    console.setReadOnly(true);
+    console.setTextInteractionFlags(Qt::NoTextInteraction);
+    console.showMaximized();
+
+    Producer producer;
+    Consumer consumer;
+
+    QObject::connect(&consumer, SIGNAL(stringConsumed(const QString&)), &console, SLOT(insertPlainText(QString)), Qt::BlockingQueuedConnection);
+
+    producer.start();
+    consumer.start();
+
+    app.exec();
+#else
     QCoreApplication app(argc, argv);
     Producer producer;
     Consumer consumer;
@@ -102,5 +134,8 @@ int main(int argc, char *argv[])
     producer.wait();
     consumer.wait();
     return 0;
+#endif
 }
 //! [6]
+
+#include "semaphores.moc"
index 185a051..96ab3a5 100644 (file)
@@ -1,5 +1,6 @@
 SOURCES += semaphores.cpp
-QT = core
+QT = core gui
+
 CONFIG -= app_bundle
 CONFIG += console
 
@@ -10,3 +11,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/semaphores
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example might not fully work on Simulator platform)
index fd62cce..7b5eec6 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 5c8cb71..0063db5 100644 (file)
 **
 ****************************************************************************/
 
-#include <QtCore>
+#include <QtGui>
 
 #include <stdio.h>
 #include <stdlib.h>
 
 //! [0]
+#ifdef Q_WS_S60
+const int DataSize = 300;
+#else
 const int DataSize = 100000;
+#endif
+
 const int BufferSize = 8192;
 char buffer[BufferSize];
 
@@ -59,60 +64,110 @@ class Producer : public QThread
 //! [1] //! [2]
 {
 public:
-    void run();
-};
+    Producer(QObject *parent = NULL) : QThread(parent)
+    {
+    }
 
-void Producer::run()
-{
-    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
-    
-    for (int i = 0; i < DataSize; ++i) {
-        mutex.lock();
-        if (numUsedBytes == BufferSize)
-            bufferNotFull.wait(&mutex);
-        mutex.unlock();
-
-        buffer[i % BufferSize] = "ACGT"[(int)qrand() % 4];
-
-        mutex.lock();
-        ++numUsedBytes;
-        bufferNotEmpty.wakeAll();
-        mutex.unlock();
+    void run()
+    {
+        qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+        for (int i = 0; i < DataSize; ++i) {
+            mutex.lock();
+            if (numUsedBytes == BufferSize)
+                bufferNotFull.wait(&mutex);
+            mutex.unlock();
+
+            buffer[i % BufferSize] = "ACGT"[(int)qrand() % 4];
+
+            mutex.lock();
+            ++numUsedBytes;
+            bufferNotEmpty.wakeAll();
+            mutex.unlock();
+        }
     }
-}
+};
 //! [2]
 
 //! [3]
 class Consumer : public QThread
 //! [3] //! [4]
 {
+    Q_OBJECT
 public:
-    void run();
+    Consumer(QObject *parent = NULL) : QThread(parent)
+    {
+    }
+
+    void run()
+    {
+        for (int i = 0; i < DataSize; ++i) {
+            mutex.lock();
+            if (numUsedBytes == 0)
+                bufferNotEmpty.wait(&mutex);
+            mutex.unlock();
+
+    #ifdef Q_WS_S60
+            emit stringConsumed(QString(buffer[i % BufferSize]));
+    #else
+            fprintf(stderr, "%c", buffer[i % BufferSize]);
+    #endif
+
+            mutex.lock();
+            --numUsedBytes;
+            bufferNotFull.wakeAll();
+            mutex.unlock();
+        }
+        fprintf(stderr, "\n");
+    }
+
+signals:
+    void stringConsumed(const QString &text);
 };
+//! [4]
 
-void Consumer::run()
+#ifdef Q_WS_S60
+class PlainTextEdit : public QPlainTextEdit
 {
-    for (int i = 0; i < DataSize; ++i) {
-        mutex.lock();
-        if (numUsedBytes == 0)
-            bufferNotEmpty.wait(&mutex);
-        mutex.unlock();
-
-        fprintf(stderr, "%c", buffer[i % BufferSize]);
-
-        mutex.lock();
-        --numUsedBytes;
-        bufferNotFull.wakeAll();
-        mutex.unlock();
+    Q_OBJECT
+public:
+    PlainTextEdit(QWidget *parent = NULL) : QPlainTextEdit(parent), producer(NULL), consumer(NULL)
+    {
+        setTextInteractionFlags(Qt::NoTextInteraction);
+
+        producer = new Producer(this);
+        consumer = new Consumer(this);
+
+        QObject::connect(consumer, SIGNAL(stringConsumed(const QString &)), SLOT(insertPlainText(const QString &)), Qt::BlockingQueuedConnection);
+
+        QTimer::singleShot(0, this, SLOT(startThreads()));
     }
-    fprintf(stderr, "\n");
-}
-//! [4]
+
+protected:
+    Producer *producer;
+    Consumer *consumer;
+
+protected slots:
+    void startThreads()
+    {
+        producer->start();
+        consumer->start();
+    }
+};
+#endif
 
 //! [5]
 int main(int argc, char *argv[])
 //! [5] //! [6]
 {
+#ifdef Q_WS_S60
+    QApplication app(argc, argv);
+
+    PlainTextEdit console;
+    console.showMaximized();
+
+    return app.exec();
+#else
     QCoreApplication app(argc, argv);
     Producer producer;
     Consumer consumer;
@@ -121,5 +176,8 @@ int main(int argc, char *argv[])
     producer.wait();
     consumer.wait();
     return 0;
+#endif
 }
 //! [6]
+
+#include "waitconditions.moc"
index 53350d2..e326afa 100644 (file)
@@ -3,8 +3,8 @@
 ######################################################################
 
 TEMPLATE = app
+QT = core gui
 CONFIG -= moc app_bundle
-QT -= gui
 DEPENDPATH += .
 INCLUDEPATH += .
 
@@ -19,3 +19,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/threads/waitconditions
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example might not fully work on Simulator platform)
index 2403fc8..2e2c903 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/codecs
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 3db4484..fd288f3 100644 (file)
@@ -12,3 +12,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/completer
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 45166d3..0cf58ea 100644 (file)
@@ -7,3 +7,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/contiguouscache
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS contiguouscache.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/contiguouscache
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 3b0874c..b28272e 100644 (file)
@@ -12,3 +12,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/customcompleter
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 3079964..0871151 100644 (file)
@@ -1,3 +1,16 @@
 HEADERS   = message.h
 SOURCES   = main.cpp \
             message.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customcompleter.pro resources
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index b8b2aaf..0ad9aaa 100644 (file)
@@ -3,3 +3,16 @@ HEADERS   = message.h \
 SOURCES   = main.cpp \
             message.cpp \
             window.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS customcompleter.pro resources
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/customcompleter
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 164dcad..c59f17d 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index c1b65bf..c2e9a31 100644 (file)
@@ -19,3 +19,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin/echowindow
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 617c1dd..76bfebe 100644 (file)
@@ -14,6 +14,12 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS plugin.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/echoplugin/plugin
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian {
+    CONFIG += qt_example
+    TARGET.EPOCALLOWDLLDATA = 1
+}
 
-symbian:TARGET.EPOCALLOWDLLDATA = 1
+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)
index c68620a..366bc4c 100644 (file)
@@ -26,3 +26,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/i18n
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index e8582a9..f51dad4 100644 (file)
@@ -15,3 +15,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/inputpanel
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8b91053..e2966de 100644 (file)
@@ -26,3 +26,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaint
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 26a3f98..7289522 100644 (file)
@@ -15,3 +15,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins/basictoo
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index a9dc116..cc66b57 100644 (file)
@@ -17,3 +17,4 @@ INSTALLS += target sources
 symbian: CONFIG += qt_example
 
 symbian:TARGET.EPOCALLOWDLLDATA = 1
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 857b62e..eda965f 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/plugandpaintplugins
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 6690480..0e84510 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/regexp
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 140e59f..ca9e2ca 100644 (file)
@@ -15,3 +15,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/settingseditor
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 319a2be..2484ee6 100644 (file)
@@ -23,3 +23,4 @@ INSTALLS += target sources
 symbian: CONFIG += qt_example
 
 symbian:TARGET.EPOCALLOWDLLDATA = 1
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
index 69935f6..90a36b8 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 6d6d9f5..556bc1d 100644 (file)
@@ -17,3 +17,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/styleplugin/stylewindow
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 4b8c896..5335b7f 100644 (file)
@@ -24,3 +24,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 11f5908..fbb4d7c 100644 (file)
@@ -12,3 +12,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/treemodelcompleter
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index ce11d35..f8f127c 100644 (file)
@@ -16,3 +16,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/undoframework
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 7f8ec9b..31f0bf4 100644 (file)
@@ -6,3 +6,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/dials
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dials.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/dials
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 21e4294..550fc53 100644 (file)
@@ -9,3 +9,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fingerpaint.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index c1caa98..a28345d 100644 (file)
@@ -6,3 +6,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/knobs
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS knobs.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/knobs
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index e686423..f7fd695 100644 (file)
@@ -14,3 +14,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/pinchzoom
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS pinchzoom.pro images
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/pinchzoom
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index ba945e2..279998b 100644 (file)
@@ -6,3 +6,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook-fr
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS addressbook-fr.pro README
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook-fr
 INSTALLS += target sources
+
index c22df74..d762870 100644 (file)
@@ -7,3 +7,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index a0a53e6..7ffe1db 100644 (file)
@@ -7,3 +7,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part2.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 0e28296..713afda 100644 (file)
@@ -7,3 +7,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part3.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 31458a7..1bfc4dc 100644 (file)
@@ -7,3 +7,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part4.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 0899fdd..08a5f7d 100644 (file)
@@ -9,3 +9,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part5.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index df161f4..3bf1987 100644 (file)
@@ -9,3 +9,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part6.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 22f4435..337b598 100644 (file)
@@ -9,3 +9,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part7.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 575f5cb..e549844 100644 (file)
@@ -8,3 +8,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index b392ee0..1b1bd7b 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8dbf7f2..204cc2d 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 7ab6731..10193b8 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8dbba2e..8276582 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 134a7e0..efb36fa 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 42401bd..4ece4d7 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index ffa9444..9ba9807 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 102bad5..e99956a 100755 (executable)
@@ -15,3 +15,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/1_readonly
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index f7a950a..c6416dc 100755 (executable)
@@ -14,3 +14,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/2_formatting
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index d1f8971..e5a61fc 100755 (executable)
@@ -14,3 +14,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/3_changingmode
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 2a8b2db..16f907d 100755 (executable)
@@ -14,3 +14,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/4_headers
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index f8d725d..fadd0e2 100755 (executable)
@@ -16,3 +16,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/5_edit
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 56b00aa..94f301a 100755 (executable)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/6_treeview
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 5dd65ad..bbac7ab 100755 (executable)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview/7_selections
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 853edfb..3dc4bcc 100755 (executable)
@@ -14,3 +14,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/modelview
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index ea319ad..2251d1b 100644 (file)
@@ -5,3 +5,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/childwidget
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS childwidget.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/childwidget
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index cb27f9e..0dd6bf1 100644 (file)
@@ -5,3 +5,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/nestedlayouts
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS nestedlayouts.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/nestedlayouts
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index b83ccfa..629bdef 100644 (file)
@@ -5,3 +5,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/toplevel
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS toplevel.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/toplevel
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index f8b55ba..1878433 100644 (file)
@@ -5,3 +5,10 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/windowlayout
 sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS windowlayout.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/windowlayout
 INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index f61c92c..56ba8ef 100644 (file)
@@ -46,7 +46,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     CalculatorForm calculator;
+#if defined(Q_OS_SYMBIAN)
+    calculator.showMaximized();
+#else
     calculator.show();
+#endif
     return app.exec();
 }
 //! [0]
index 83b4a13..3debb7b 100644 (file)
@@ -14,3 +14,5 @@ symbian {
     TARGET.UID3 = 0xA000D7C1
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 9604cea..73a9f5e 100644 (file)
@@ -10,3 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools/textfinder
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 7b11c98..8a99f61 100644 (file)
@@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/uitools
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 77f4b7f..c9545c8 100644 (file)
@@ -12,3 +12,5 @@ symbian {
     TARGET.UID3 = 0xA000A64F
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 0f31f07..040fbb0 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     AnalogClock clock;
+#if defined(Q_OS_SYMBIAN)
+    clock.showMaximized();
+#else
     clock.show();
+#endif
     return app.exec();
 }
index 991ffc3..3fbdf03 100644 (file)
@@ -47,7 +47,7 @@
 
 //! [0]
 Calculator::Calculator(QWidget *parent)
-    : QDialog(parent)
+    : QWidget(parent)
 {
     sumInMemory = 0.0;
     sumSoFar = 0.0;
@@ -98,8 +98,11 @@ Calculator::Calculator(QWidget *parent)
 //! [5]
     QGridLayout *mainLayout = new QGridLayout;
 //! [5] //! [6]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
+#else
     mainLayout->setSizeConstraint(QLayout::SetFixedSize);
-
+#endif
     mainLayout->addWidget(display, 0, 0, 1, 6);
     mainLayout->addWidget(backspaceButton, 1, 0, 1, 2);
     mainLayout->addWidget(clearButton, 1, 2, 1, 2);
index e1221f4..3548b85 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef CALCULATOR_H
 #define CALCULATOR_H
 
-#include <QDialog>
+#include <QWidget>
 
 QT_BEGIN_NAMESPACE
 class QLineEdit;
@@ -49,7 +49,7 @@ QT_END_NAMESPACE
 class Button;
 
 //! [0]
-class Calculator : public QDialog
+class Calculator : public QWidget
 {
     Q_OBJECT
 
index d6bda73..4c10e84 100644 (file)
@@ -14,3 +14,5 @@ symbian {
     TARGET.UID3 = 0xA000C602
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 0038aa1..3974f80 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Calculator calc;
+#if defined(Q_OS_SYMBIAN)
+    calc.showMaximized();
+#else
     calc.show();
+#endif
     return app.exec();
 }
index cce3fb5..e0845fe 100644 (file)
@@ -12,3 +12,8 @@ symbian {
     TARGET.UID3 = 0xA000C603
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 8356321..20a54dd 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/charactermap
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 2e15d86..8fffb27 100644 (file)
@@ -7,3 +7,8 @@ sources.files = $$SOURCES $$HEADERS *.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/codeeditor
 INSTALLS += target sources
 
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
index a2a81a1..cd87ac9 100644 (file)
@@ -48,7 +48,11 @@ int main(int argv, char **args)
 
     CodeEditor editor;
     editor.setWindowTitle(QObject::tr("Code Editor Example"));
+#if defined(Q_OS_SYMBIAN)
+    editor.showMaximized();
+#else
     editor.show();
+#endif
 
     return app.exec();
 }
index ae90686..62346cd 100644 (file)
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/digitalclock
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index c43162b..d022918 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     DigitalClock clock;
+#if defined(Q_OS_SYMBIAN)
+    clock.showMaximized();
+#else
     clock.show();
+#endif
     return app.exec();
 }
index 48056a3..92f9d46 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/groupbox
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index b355dc7..71c73d6 100644 (file)
@@ -25,3 +25,8 @@ wince*: {
     }
     DEPLOYMENT += imageFiles
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 923c1f8..c1ba2bd 100644 (file)
@@ -46,6 +46,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();
 }
index 1c0ac78..63dd4f0 100644 (file)
@@ -10,6 +10,14 @@ INSTALLS += target sources
 
 symbian: CONFIG += qt_example
 
+#Symbian has built-in component named imageviewer so we use different target
+symbian: TARGET = imageviewerexample
+
 wince*: {
    DEPLOYMENT_PLUGIN += qjpeg qmng qgif
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 55a362a..8d1a068 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     ImageViewer imageViewer;
+#if defined(Q_OS_SYMBIAN)
+    imageViewer.showMaximized();
+#else
     imageViewer.show();
+#endif
     return app.exec();
 }
index b568aac..d463c50 100644 (file)
@@ -12,3 +12,8 @@ symbian {
     TARGET.UID3 = 0xA000C604
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 3863234..b9a1c69 100644 (file)
@@ -47,5 +47,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     MoviePlayer player;
     player.show();
+#if defined(Q_OS_SYMBIAN)
+    player.showMaximized();
+#else
+    player.show();
+#endif
     return app.exec();
 }
index f41bbbb..874fb77 100644 (file)
@@ -17,3 +17,8 @@ wince*: {
    DEPLOYMENT_PLUGIN += qmng
 }
 
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+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)
index 01c8ada..dffe803 100644 (file)
@@ -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();
 }
index 09c6882..6532e06 100644 (file)
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/scribble
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 9b7f951..f5e9718 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     ShapedClock clock;
+#if defined(Q_OS_SYMBIAN)
+    clock.showMaximized();
+#else
     clock.show();
+#endif
     return app.exec();
 }
index 5563d34..e8dc9c9 100644 (file)
@@ -12,3 +12,7 @@ symbian {
     TARGET.UID3 = 0xA000C605
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example might not fully work on Symbian platform)
+maemo5: warning(This example might not fully work on Maemo platform)
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 74ca764..1ef7190 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/sliders
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index b4be01f..ed4d5b5 100644 (file)
@@ -13,3 +13,5 @@ symbian {
     TARGET.UID3 = 0xA000CF6B
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index f2079f5..4a43828 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     Window window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     return app.exec();
 }
index 11c471b..5aa3ed5 100644 (file)
@@ -9,3 +9,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/spinboxes
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 4806a1d..7efa011 100644 (file)
@@ -14,3 +14,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/styles
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index fd417a0..3c2aaa2 100644 (file)
@@ -48,6 +48,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();
 }
index 42df886..eec7d1a 100644 (file)
@@ -14,3 +14,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/stylesheet
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 27aab50..1e045c8 100644 (file)
@@ -52,9 +52,14 @@ int main(int argv, char *args[])
     app.setCanvas(canvas);
 
     MainWindow mainWindow(canvas);
+#if defined(Q_OS_SYMBIAN)
+    mainWindow.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    mainWindow.show();
+#else
     mainWindow.resize(500, 500);
     mainWindow.show();
-
+#endif
     return app.exec();
 }
 //! [0]
index 8519997..330a50a 100644 (file)
@@ -13,3 +13,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/tablet
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 9a7dcf3..622aee9 100644 (file)
@@ -48,7 +48,11 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     TetrixWindow window;
+#if defined(Q_OS_SYMBIAN)
+    window.showMaximized();
+#else
     window.show();
+#endif
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
     return app.exec();
 }
index 1c777f6..5b95691 100644 (file)
@@ -16,3 +16,5 @@ symbian {
     TARGET.UID3 = 0xA000C606
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index c31d90a..2e17f23 100644 (file)
@@ -49,6 +49,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
     SortingBox sortingBox;
+#if defined(Q_OS_SYMBIAN)
+    sortingBox.showMaximized();
+#else
     sortingBox.show();
+#endif
     return app.exec();
 }
index d072537..ab0c98e 100644 (file)
@@ -12,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/tooltips
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 5e5765e..748a361 100644 (file)
@@ -128,7 +128,11 @@ int main(int argc, char **argv)
     QApplication app(argc, argv);
 
     ValidatorWidget w;
+#if defined(Q_OS_SYMBIAN)
+    w.showMaximized();
+#else
     w.show();
+#endif
 
     return app.exec();
 }
index 5f36bb8..2713b7d 100644 (file)
@@ -21,3 +21,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/validators
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index 8811f8b..b7a92d1 100644 (file)
@@ -1,15 +1,18 @@
 TEMPLATE      = subdirs
 SUBDIRS       = analogclock \
+                applicationicon \
                 calculator \
                 calendarwidget \
                 charactermap \
                 codeeditor \
                 digitalclock \
+                elidedlabel \
                 groupbox \
                 icons \
                 imageviewer \
                 lineedits \
                 movie \
+                orientation \
                 scribble \
                 shapedclock \
                 sliders \
@@ -20,7 +23,7 @@ SUBDIRS       = analogclock \
                 tooltips \
                 validators \
                 wiggly \
-                windowflags
+                windowflags \
 
 symbian: SUBDIRS = \
                 analogclock \
@@ -28,10 +31,13 @@ symbian: SUBDIRS = \
                 calendarwidget \
                 lineedits \
                 shapedclock \
+               symbianvibration \
                 tetrix \
                 wiggly \
                 softkeys
 
+MAEMO5: SUBDIRS += maemovibration
+
 contains(styles, motif): SUBDIRS += styles
 
 # install
@@ -41,3 +47,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 91cd1b8..0b92228 100644 (file)
@@ -47,6 +47,10 @@ int main(int argc, char *argv[])
     QApplication app(argc, argv);
     bool smallScreen = QApplication::arguments().contains("-small-screen");
 
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_HILDON) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+    smallScreen = true;
+#endif
+
     Dialog dialog(0, smallScreen);
 
     if (!smallScreen)
index e3a8fbc..411e0d3 100644 (file)
@@ -14,3 +14,5 @@ symbian {
     TARGET.UID3 = 0xA000C607
     CONFIG += qt_example
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 8dd71ed..941a3fa 100644 (file)
@@ -46,6 +46,10 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     ControllerWindow controller;
+#if defined(Q_OS_SYMBIAN)
+    controller.showMaximized();
+#else
     controller.show();
+#endif
     return app.exec();
 }
index 23599d0..892bbd7 100644 (file)
@@ -11,3 +11,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/windowflags
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+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)
index aa81545..3d38ca3 100644 (file)
@@ -13,8 +13,17 @@ INSTALLS += target sources
 
 symbian: CONFIG += qt_example
 
+symbian: {
+    include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+    addFiles.sources = frank.xbel jennifer.xbel
+    addFiles.path = files
+    DEPLOYMENT += addFiles
+}
+
 wince*: {
-     addFiles.files = frank.xbel jennifer.xbel
-     addFiles.path = "\\My Documents"
-     DEPLOYMENT += addFiles
+    addFiles.files = frank.xbel jennifer.xbel
+    addFiles.path = "\\My Documents"
+    DEPLOYMENT += addFiles
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index 71ce6ae..6a3bb8c 100644 (file)
@@ -46,7 +46,12 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     MainWindow mainWin;
+#if defined(Q_OS_SYMBIAN)
+    mainWin.showMaximized();
+#else
     mainWin.show();
+#endif
+
     mainWin.open();
     return app.exec();
 }
index b3bfe64..0a3a3f9 100644 (file)
@@ -59,6 +59,15 @@ MainWindow::MainWindow()
 
 void MainWindow::open()
 {
+#if defined(Q_OS_SYMBIAN)
+    // Look for bookmarks on the same drive where the application is installed to,
+    // if drive is not read only. QDesktopServices::DataLocation does this check,
+    // and returns writable drive.
+    QString bookmarksFolder =
+            QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
+    bookmarksFolder.append(":/Data/qt/saxbookmarks");
+    QDir::setCurrent(bookmarksFolder);
+#endif
     QString fileName =
             QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
                                          QDir::currentPath(),
@@ -81,6 +90,15 @@ void MainWindow::open()
 
 void MainWindow::saveAs()
 {
+#if defined(Q_OS_SYMBIAN)
+    // Look for bookmarks on the same drive where the application is installed to,
+    // if drive is not read only. QDesktopServices::DataLocation does this check,
+    // and returns writable drive.
+    QString bookmarksFolder =
+            QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
+    bookmarksFolder.append(":/Data/qt/saxbookmarks");
+    QDir::setCurrent(bookmarksFolder);
+#endif
     QString fileName =
             QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
                                          QDir::currentPath(),
index b7a2625..7a58ed3 100644 (file)
@@ -1,6 +1,10 @@
 SOURCES += main.cpp
 QT -= gui
 
+RESOURCES   = resources.qrc
+
+win32: CONFIG += console
+
 wince*|symbian:{
    htmlfiles.files = *.html
    htmlfiles.path = .
@@ -17,3 +21,6 @@ symbian {
     TARGET.UID3 = 0xA000C609
     CONFIG += qt_example
 }
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example does not work on Symbian platform)
index cb7ac52..4e36b1c 100644 (file)
@@ -101,7 +101,8 @@ int main(int argc, char **argv)
     QStringList filter;
     filter << "*.htm";
     filter << "*.html";
-    QStringList htmlFiles = QDir::current().entryList(filter, QDir::Files);
+
+    QStringList htmlFiles = QDir(":/").entryList(filter, QDir::Files);
 
     QTextStream out(stdout);
 
@@ -112,7 +113,7 @@ int main(int argc, char **argv)
 
     // parse each html file and write the result to file/stream
     foreach(QString file, htmlFiles)
-        parseHtmlFile(out, file);
+        parseHtmlFile(out, ":/" + file);
 
     return 0;
 }
index 011569f..78abb92 100644 (file)
@@ -58,6 +58,10 @@ int main(int argc, char **argv)
 {
     QApplication app(argc, argv);
     RSSListing *rsslisting = new RSSListing;
+#if defined(Q_OS_SYMBIAN)
+    rsslisting->showMaximized();
+#else
     rsslisting->show();
+#endif
     return app.exec();
 }
index 5840f08..ffc6d1a 100644 (file)
@@ -74,6 +74,24 @@ its operation, and also allows very large data sources to be read.
 RSSListing::RSSListing(QWidget *parent)
     : QWidget(parent), currentReply(0)
 {
+#ifdef Q_OS_SYMBIAN
+    // Set Internet Access Point
+    QNetworkConfigurationManager manager;
+    const bool canStartIAP = manager.capabilities() & QNetworkConfigurationManager::CanStartAndStopInterfaces;
+
+    // Is there default access point, use it
+    QNetworkConfiguration cfg = manager.defaultConfiguration();
+    if (!cfg.isValid() || !canStartIAP) {
+        // Available Access Points not found
+        QMessageBox::warning(this, "Error", "No access point");
+        return;
+    }
+
+    m_session = new QNetworkSession(cfg);
+    m_session->open();
+    m_session->waitForOpened();
+#endif
+
     lineEdit = new QLineEdit(this);
     lineEdit->setText("http://labs.qt.nokia.com/blogs/feed");
 
@@ -104,7 +122,9 @@ RSSListing::RSSListing(QWidget *parent)
     layout->addWidget(treeWidget);
 
     setWindowTitle(tr("RSS listing example"));
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5)
     resize(640,480);
+#endif
 }
 
 /*
index 98254f8..49c6940 100644 (file)
 #include <QXmlStreamReader>
 #include <QUrl>
 
+#ifdef Q_OS_SYMBIAN
+// Bearer
+#include <QNetworkConfigurationManager>
+#include <QNetworkSession>
+#include <QPointer>
+
+// QtMobility namespace
+QTM_USE_NAMESPACE
+#endif
+
 QT_BEGIN_NAMESPACE
 class QLineEdit;
 class QTreeWidget;
@@ -84,6 +94,11 @@ private:
     QLineEdit *lineEdit;
     QTreeWidget *treeWidget;
     QPushButton *fetchButton;
+
+#ifdef Q_OS_SYMBIAN
+    // for bearer management
+    QPointer<QNetworkSession> m_session;
+#endif
 };
 
 #endif
index c883b77..413fdf6 100644 (file)
@@ -8,5 +8,15 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS rsslisting.pro
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/rsslisting
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian {
+    CONFIG += qt_example
 
+    # For QtMobility
+    CONFIG += mobility
+    MOBILITY = bearer
+
+    # For QtMobility
+    TARGET.CAPABILITY = NetworkServices
+}
+
+maemo5: CONFIG += qt_example
index bb1e096..f03fae8 100644 (file)
@@ -26,3 +26,5 @@ symbian: {
      addFiles.path = /data/qt/saxbookmarks
      DEPLOYMENT += addFiles
 }
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
index c44e921..d909c01 100644 (file)
@@ -47,6 +47,9 @@ int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);
     MainWindow mainWin;
+#ifdef Q_OS_SYMBIAN
+    mainWin.showFullScreen();
+#endif
     mainWin.show();
     mainWin.open();
     return app.exec();
index e9236e9..ac839fe 100644 (file)
@@ -68,6 +68,15 @@ MainWindow::MainWindow()
 //! [1]
 void MainWindow::open()
 {
+#if defined(Q_OS_SYMBIAN)
+    // Look for bookmarks on the same drive where the application is installed to,
+    // if drive is not read only. QDesktopServices::DataLocation does this check,
+    // and returns writable drive.
+    QString bookmarksFolder =
+            QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
+    bookmarksFolder.append(":/Data/qt/saxbookmarks");
+    QDir::setCurrent(bookmarksFolder);
+#endif
     QString fileName =
             QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
                                          QDir::currentPath(),
@@ -103,6 +112,15 @@ void MainWindow::open()
 //! [2]
 void MainWindow::saveAs()
 {
+#if defined(Q_OS_SYMBIAN)
+    // Look for bookmarks on the same drive where the application is installed to,
+    // if drive is not read only. QDesktopServices::DataLocation does this check,
+    // and returns writable drive.
+    QString bookmarksFolder =
+            QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
+    bookmarksFolder.append(":/Data/qt/saxbookmarks");
+    QDir::setCurrent(bookmarksFolder);
+#endif
     QString fileName =
             QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
                                          QDir::currentPath(),
index 91abf97..9ccbb61 100644 (file)
@@ -13,4 +13,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS streambookmarks.pro *.xb
 sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/streambookmarks
 INSTALLS += target sources
 
-symbian: CONFIG += qt_example
+symbian: {
+    CONFIG += qt_example
+    addFiles.sources = frank.xbel jennifer.xbel
+    addFiles.path = /data/qt/streambookmarks
+    DEPLOYMENT += addFiles
+}
+maemo5: CONFIG += qt_example
index 7ef5ead..485e08f 100644 (file)
@@ -18,3 +18,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
index 9eb5b2a..dcc8197 100644 (file)
@@ -10,3 +10,7 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/xmlstreamlint
 INSTALLS += target sources
 
 symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
index 5182021..7790137 100644 (file)
@@ -119,6 +119,7 @@ protected:
                                            const SymbianLocalizationList &symbianLocalizationList);
     QString generateLocFileName();
 
+
 protected:
     MakefileGenerator *generator;
 
index ee1115b..c44c8f1 100644 (file)
@@ -199,6 +199,19 @@ QT_END_NAMESPACE
     [super setInitialFirstResponder:view];
 }
 
+- (void)setInitialFirstResponder:(NSView *)view
+{
+    // This method is called the first time the window is placed on screen and
+    // is the earliest point in time we can connect OpenGL contexts to NSViews.
+    QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+    if (qwidget) {
+        qt_event_request_window_change(qwidget);
+        qt_mac_send_posted_gl_updates(qwidget);
+    }
+
+    [super setInitialFirstResponder:view];
+}
+
 - (BOOL)makeFirstResponder:(NSResponder *)responder
 {
     // For some reason Cocoa wants to flip the first responder
index d29a46a..5f55559 100644 (file)
@@ -613,7 +613,7 @@ void QWidget::setAutoFillBackground(bool enabled)
     \brief The QWidget class is the base class of all user interface objects.
 
     \ingroup basicwidgets
-    
+
     The widget is the atom of the user interface: it receives mouse, keyboard
     and other events from the window system, and paints a representation of
     itself on the screen. Every widget is rectangular, and they are sorted in a