summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/animation/animatedtiles/animatedtiles.desktop11
-rw-r--r--examples/animation/animatedtiles/animatedtiles.pro1
-rw-r--r--examples/animation/animatedtiles/main.cpp4
-rw-r--r--examples/animation/appchooser/appchooser.desktop11
-rw-r--r--examples/animation/appchooser/appchooser.pro1
-rw-r--r--examples/animation/appchooser/main.cpp30
-rw-r--r--examples/animation/easing/easing.desktop11
-rw-r--r--examples/animation/easing/easing.pro4
-rw-r--r--examples/animation/easing/form.ui95
-rw-r--r--examples/animation/easing/main.cpp8
-rw-r--r--examples/animation/easing/window.cpp7
-rw-r--r--examples/animation/easing/window.h2
-rw-r--r--examples/animation/moveblocks/main.cpp41
-rw-r--r--examples/animation/moveblocks/moveblocks.desktop11
-rw-r--r--examples/animation/moveblocks/moveblocks.pro1
-rw-r--r--examples/animation/states/main.cpp38
-rw-r--r--examples/animation/states/states.desktop11
-rw-r--r--examples/animation/states/states.pro1
-rw-r--r--examples/animation/stickman/graphicsview.cpp5
-rw-r--r--examples/animation/stickman/graphicsview.h1
-rw-r--r--examples/animation/stickman/lifecycle.cpp6
-rw-r--r--examples/animation/stickman/lifecycle.h3
-rw-r--r--examples/animation/stickman/main.cpp34
-rw-r--r--examples/animation/stickman/rectbutton.cpp33
-rw-r--r--examples/animation/stickman/rectbutton.h25
-rw-r--r--examples/animation/stickman/stickman.desktop11
-rw-r--r--examples/animation/stickman/stickman.pro7
-rw-r--r--examples/dbus/complexpingpong/complexping.desktop11
-rw-r--r--examples/dbus/complexpingpong/complexping.pro4
-rw-r--r--examples/dbus/complexpingpong/complexpong.desktop11
-rw-r--r--examples/dbus/complexpingpong/complexpong.pro4
-rw-r--r--examples/dbus/dbus-chat/dbus-chat.desktop11
-rw-r--r--examples/dbus/dbus-chat/dbus-chat.pro4
-rw-r--r--examples/dbus/dbus.pro1
-rw-r--r--examples/dbus/listnames/listnames.desktop11
-rw-r--r--examples/dbus/listnames/listnames.pro5
-rw-r--r--examples/dbus/pingpong/ping.desktop11
-rw-r--r--examples/dbus/pingpong/ping.pro3
-rw-r--r--examples/dbus/pingpong/pong.desktop11
-rw-r--r--examples/dbus/pingpong/pong.pro3
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.desktop11
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.pro4
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.desktop11
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.pro4
-rw-r--r--examples/dbus/remotecontrolledcar/remotecontrolledcar.pro1
-rw-r--r--examples/desktop/desktop.pro1
-rw-r--r--examples/desktop/screenshot/screenshot.desktop11
-rw-r--r--examples/desktop/screenshot/screenshot.pro4
-rw-r--r--examples/desktop/systray/systray.desktop11
-rw-r--r--examples/dialogs/classwizard/classwizard.desktop11
-rw-r--r--examples/dialogs/classwizard/classwizard.pro4
-rw-r--r--examples/dialogs/configdialog/configdialog.desktop11
-rw-r--r--examples/dialogs/configdialog/configdialog.pro4
-rw-r--r--examples/dialogs/dialogs.pro1
-rw-r--r--examples/dialogs/extension/extension.desktop11
-rw-r--r--examples/dialogs/extension/extension.pro2
-rw-r--r--examples/dialogs/extension/finddialog.cpp45
-rw-r--r--examples/dialogs/extension/main.cpp9
-rw-r--r--examples/dialogs/findfiles/findfiles.desktop11
-rw-r--r--examples/dialogs/findfiles/findfiles.pro1
-rw-r--r--examples/dialogs/findfiles/main.cpp4
-rw-r--r--examples/dialogs/findfiles/window.cpp23
-rw-r--r--examples/dialogs/findfiles/window.h4
-rw-r--r--examples/dialogs/licensewizard/licensewizard.desktop11
-rw-r--r--examples/dialogs/licensewizard/licensewizard.pro4
-rw-r--r--examples/dialogs/sipdialog/sipdialog.desktop11
-rw-r--r--examples/dialogs/sipdialog/sipdialog.pro5
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp15
-rw-r--r--examples/dialogs/standarddialogs/dialog.h4
-rw-r--r--examples/dialogs/standarddialogs/main.cpp8
-rw-r--r--examples/dialogs/standarddialogs/standarddialogs.desktop11
-rw-r--r--examples/dialogs/standarddialogs/standarddialogs.pro1
-rw-r--r--examples/dialogs/tabdialog/main.cpp8
-rw-r--r--examples/dialogs/tabdialog/tabdialog.cpp1
-rw-r--r--examples/dialogs/tabdialog/tabdialog.desktop11
-rw-r--r--examples/dialogs/tabdialog/tabdialog.pro3
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.cpp4
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.desktop11
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.pro3
-rw-r--r--examples/draganddrop/delayedencoding/delayedencoding.desktop11
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.desktop11
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.pro1
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.cpp9
-rw-r--r--examples/draganddrop/draggableicons/main.cpp4
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.desktop11
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.pro2
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp4
-rw-r--r--examples/draganddrop/draggabletext/main.cpp4
-rw-r--r--examples/draganddrop/dropsite/dropsite.desktop11
-rw-r--r--examples/draganddrop/dropsite/dropsite.pro4
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.cpp4
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.desktop11
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.pro2
-rw-r--r--examples/draganddrop/fridgemagnets/main.cpp5
-rw-r--r--examples/draganddrop/puzzle/main.cpp4
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp16
-rw-r--r--examples/draganddrop/puzzle/pieceslist.cpp6
-rw-r--r--examples/draganddrop/puzzle/pieceslist.h4
-rw-r--r--examples/draganddrop/puzzle/puzzle.desktop11
-rw-r--r--examples/draganddrop/puzzle/puzzle.pro1
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.cpp26
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.h6
-rw-r--r--examples/effects/blurpicker/blurpicker.cpp32
-rw-r--r--examples/effects/blurpicker/blurpicker.desktop11
-rw-r--r--examples/effects/blurpicker/blurpicker.h2
-rw-r--r--examples/effects/blurpicker/blurpicker.pro3
-rw-r--r--examples/effects/blurpicker/main.cpp5
-rw-r--r--examples/effects/fademessage/fademessage.cpp11
-rw-r--r--examples/effects/fademessage/fademessage.desktop11
-rw-r--r--examples/effects/fademessage/fademessage.pro4
-rw-r--r--examples/effects/fademessage/main.cpp4
-rw-r--r--examples/effects/lighting/lighting.cpp6
-rw-r--r--examples/effects/lighting/lighting.desktop11
-rw-r--r--examples/effects/lighting/lighting.h3
-rw-r--r--examples/effects/lighting/lighting.pro4
-rw-r--r--examples/effects/lighting/main.cpp5
-rw-r--r--examples/examples.pro1
-rw-r--r--examples/gestures/imagegestures/imagegestures.desktop11
-rw-r--r--examples/gestures/imagegestures/imagegestures.pro4
-rw-r--r--examples/graphicsview/anchorlayout/anchorlayout.desktop11
-rw-r--r--examples/graphicsview/anchorlayout/anchorlayout.pro5
-rw-r--r--examples/graphicsview/anchorlayout/main.cpp5
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.desktop11
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro2
-rw-r--r--examples/graphicsview/basicgraphicslayouts/main.cpp4
-rw-r--r--examples/graphicsview/collidingmice/collidingmice.desktop11
-rw-r--r--examples/graphicsview/collidingmice/collidingmice.pro2
-rw-r--r--examples/graphicsview/collidingmice/main.cpp4
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.desktop11
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.pro4
-rw-r--r--examples/graphicsview/dragdroprobot/dragdroprobot.desktop11
-rw-r--r--examples/graphicsview/dragdroprobot/dragdroprobot.pro3
-rw-r--r--examples/graphicsview/dragdroprobot/main.cpp24
-rw-r--r--examples/graphicsview/elasticnodes/edge.cpp2
-rw-r--r--examples/graphicsview/elasticnodes/elasticnodes.desktop11
-rw-r--r--examples/graphicsview/elasticnodes/elasticnodes.pro3
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.cpp29
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.h5
-rw-r--r--examples/graphicsview/elasticnodes/main.cpp15
-rw-r--r--examples/graphicsview/elasticnodes/node.cpp15
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.desktop11
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.pro5
-rw-r--r--examples/graphicsview/flowlayout/main.cpp6
-rw-r--r--examples/graphicsview/graphicsview.pro1
-rw-r--r--examples/graphicsview/padnavigator/main.cpp5
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.desktop11
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.pro3
-rw-r--r--examples/graphicsview/portedasteroids/portedasteroids.desktop11
-rw-r--r--examples/graphicsview/portedcanvas/portedcanvas.desktop11
-rw-r--r--examples/graphicsview/simpleanchorlayout/main.cpp7
-rw-r--r--examples/graphicsview/simpleanchorlayout/simpleanchorlayout.desktop11
-rw-r--r--examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro4
-rw-r--r--examples/graphicsview/weatheranchorlayout/main.cpp23
-rw-r--r--examples/graphicsview/weatheranchorlayout/weatheranchorlayout.desktop11
-rw-r--r--examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro3
-rw-r--r--examples/ipc/ipc.pro1
-rw-r--r--examples/ipc/localfortuneclient/client.cpp5
-rw-r--r--examples/ipc/localfortuneclient/client.h9
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.desktop11
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.pro5
-rw-r--r--examples/ipc/localfortuneclient/main.cpp6
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.desktop11
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.pro3
-rw-r--r--examples/ipc/localfortuneserver/main.cpp6
-rw-r--r--examples/ipc/localfortuneserver/server.cpp5
-rw-r--r--examples/ipc/localfortuneserver/server.h8
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.desktop11
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.pro5
-rw-r--r--examples/itemviews/addressbook/addressbook.desktop11
-rw-r--r--examples/itemviews/addressbook/addressbook.pro2
-rw-r--r--examples/itemviews/addressbook/main.cpp4
-rw-r--r--examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop11
-rw-r--r--examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro1
-rw-r--r--examples/itemviews/basicsortfiltermodel/main.cpp4
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.cpp41
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.h6
-rw-r--r--examples/itemviews/chart/chart.desktop11
-rw-r--r--examples/itemviews/chart/chart.pro2
-rw-r--r--examples/itemviews/chart/main.cpp4
-rw-r--r--examples/itemviews/coloreditorfactory/coloreditorfactory.desktop11
-rw-r--r--examples/itemviews/coloreditorfactory/coloreditorfactory.pro4
-rw-r--r--examples/itemviews/coloreditorfactory/main.cpp4
-rw-r--r--examples/itemviews/combowidgetmapper/combowidgetmapper.desktop11
-rw-r--r--examples/itemviews/combowidgetmapper/combowidgetmapper.pro3
-rw-r--r--examples/itemviews/combowidgetmapper/main.cpp4
-rw-r--r--examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop11
-rw-r--r--examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro1
-rw-r--r--examples/itemviews/customsortfiltermodel/main.cpp4
-rw-r--r--examples/itemviews/customsortfiltermodel/window.cpp62
-rw-r--r--examples/itemviews/customsortfiltermodel/window.h6
-rw-r--r--examples/itemviews/dirview/dirview.desktop11
-rw-r--r--examples/itemviews/dirview/dirview.pro1
-rw-r--r--examples/itemviews/dirview/main.cpp4
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.desktop11
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.pro1
-rw-r--r--examples/itemviews/editabletreemodel/main.cpp4
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.cpp5
-rw-r--r--examples/itemviews/fetchmore/fetchmore.desktop11
-rw-r--r--examples/itemviews/fetchmore/fetchmore.pro2
-rw-r--r--examples/itemviews/fetchmore/main.cpp4
-rw-r--r--examples/itemviews/frozencolumn/frozencolumn.desktop11
-rw-r--r--examples/itemviews/frozencolumn/frozencolumn.pro3
-rw-r--r--examples/itemviews/frozencolumn/main.cpp6
-rw-r--r--examples/itemviews/itemviews.pro9
-rw-r--r--examples/itemviews/pixelator/main.cpp4
-rw-r--r--examples/itemviews/pixelator/pixelator.desktop11
-rw-r--r--examples/itemviews/pixelator/pixelator.pro1
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.cpp2
-rw-r--r--examples/itemviews/puzzle/main.cpp4
-rw-r--r--examples/itemviews/puzzle/mainwindow.cpp20
-rw-r--r--examples/itemviews/puzzle/piecesmodel.cpp8
-rw-r--r--examples/itemviews/puzzle/piecesmodel.h4
-rw-r--r--examples/itemviews/puzzle/puzzle.desktop11
-rw-r--r--examples/itemviews/puzzle/puzzle.pro2
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.cpp26
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.h6
-rw-r--r--examples/itemviews/simpledommodel/main.cpp6
-rw-r--r--examples/itemviews/simpledommodel/simpledommodel.desktop11
-rw-r--r--examples/itemviews/simpledommodel/simpledommodel.pro1
-rw-r--r--examples/itemviews/simpletreemodel/main.cpp4
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.desktop11
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.pro1
-rw-r--r--examples/itemviews/simplewidgetmapper/main.cpp4
-rw-r--r--examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop11
-rw-r--r--examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro1
-rw-r--r--examples/itemviews/spinboxdelegate/main.cpp4
-rw-r--r--examples/itemviews/spinboxdelegate/spinboxdelegate.desktop11
-rw-r--r--examples/itemviews/spinboxdelegate/spinboxdelegate.pro5
-rw-r--r--examples/itemviews/stardelegate/main.cpp4
-rw-r--r--examples/itemviews/stardelegate/stardelegate.desktop11
-rw-r--r--examples/itemviews/stardelegate/stardelegate.pro4
-rw-r--r--examples/ja_JP/linguist/hellotr/hellotr.pro1
-rw-r--r--examples/layouts/basiclayouts/basiclayouts.desktop11
-rw-r--r--examples/layouts/basiclayouts/basiclayouts.pro5
-rw-r--r--examples/layouts/basiclayouts/main.cpp8
-rw-r--r--examples/layouts/borderlayout/borderlayout.desktop11
-rw-r--r--examples/layouts/borderlayout/borderlayout.pro1
-rw-r--r--examples/layouts/borderlayout/main.cpp4
-rw-r--r--examples/layouts/dynamiclayouts/dialog.cpp4
-rw-r--r--examples/layouts/dynamiclayouts/dialog.h5
-rw-r--r--examples/layouts/dynamiclayouts/dynamiclayouts.desktop11
-rw-r--r--examples/layouts/dynamiclayouts/dynamiclayouts.pro5
-rw-r--r--examples/layouts/dynamiclayouts/main.cpp7
-rw-r--r--examples/layouts/flowlayout/flowlayout.desktop11
-rw-r--r--examples/layouts/flowlayout/flowlayout.pro1
-rw-r--r--examples/layouts/flowlayout/main.cpp4
-rw-r--r--examples/layouts/flowlayout/window.cpp2
-rw-r--r--examples/layouts/layouts.pro1
-rw-r--r--examples/linguist/arrowpad/arrowpad.pro5
-rw-r--r--examples/linguist/hellotr/hellotr.pro5
-rw-r--r--examples/linguist/linguist.pro1
-rw-r--r--examples/linguist/trollprint/trollprint.pro5
-rw-r--r--examples/mainwindows/application/application.desktop11
-rw-r--r--examples/mainwindows/application/application.pro4
-rw-r--r--examples/mainwindows/application/main.cpp4
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.desktop11
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.pro5
-rw-r--r--examples/mainwindows/mainwindows.pro6
-rw-r--r--examples/mainwindows/mdi/main.cpp4
-rw-r--r--examples/mainwindows/mdi/mdi.desktop11
-rw-r--r--examples/mainwindows/mdi/mdi.pro4
-rw-r--r--examples/mainwindows/menus/main.cpp4
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp6
-rw-r--r--examples/mainwindows/menus/menus.desktop11
-rw-r--r--examples/mainwindows/menus/menus.pro3
-rw-r--r--examples/mainwindows/recentfiles/main.cpp4
-rw-r--r--examples/mainwindows/recentfiles/recentfiles.desktop11
-rw-r--r--examples/mainwindows/recentfiles/recentfiles.pro3
-rw-r--r--examples/mainwindows/sdi/main.cpp4
-rw-r--r--examples/mainwindows/sdi/sdi.desktop11
-rw-r--r--examples/mainwindows/sdi/sdi.pro4
-rw-r--r--examples/network/bearercloud/bearercloud.desktop11
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp8
-rw-r--r--examples/network/bearermonitor/bearermonitor.desktop11
-rw-r--r--examples/network/bearermonitor/bearermonitor.h4
-rw-r--r--examples/network/bearermonitor/bearermonitor.pro9
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.cpp54
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.h10
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.desktop11
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.pro9
-rw-r--r--examples/network/blockingfortuneclient/main.cpp6
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.desktop11
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.pro6
-rw-r--r--examples/network/broadcastreceiver/main.cpp6
-rw-r--r--examples/network/broadcastreceiver/receiver.cpp18
-rw-r--r--examples/network/broadcastreceiver/receiver.h9
-rw-r--r--examples/network/broadcastsender/broadcastsender.desktop11
-rw-r--r--examples/network/broadcastsender/broadcastsender.pro6
-rw-r--r--examples/network/broadcastsender/main.cpp6
-rw-r--r--examples/network/broadcastsender/sender.cpp3
-rw-r--r--examples/network/broadcastsender/sender.h4
-rw-r--r--examples/network/download/download.desktop11
-rw-r--r--examples/network/download/download.pro5
-rw-r--r--examples/network/downloadmanager/downloadmanager.desktop11
-rw-r--r--examples/network/downloadmanager/downloadmanager.pro12
-rw-r--r--examples/network/fortuneclient/fortuneclient.desktop11
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro5
-rw-r--r--examples/network/fortuneserver/fortuneserver.desktop11
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro5
-rw-r--r--examples/network/googlesuggest/googlesuggest.desktop11
-rw-r--r--examples/network/googlesuggest/googlesuggest.pro7
-rw-r--r--examples/network/http/http.desktop11
-rw-r--r--examples/network/http/http.pro6
-rw-r--r--examples/network/http/httpwindow.cpp25
-rw-r--r--examples/network/http/httpwindow.h10
-rw-r--r--examples/network/http/main.cpp17
-rw-r--r--examples/network/loopback/dialog.cpp31
-rw-r--r--examples/network/loopback/dialog.h7
-rw-r--r--examples/network/loopback/loopback.desktop11
-rw-r--r--examples/network/loopback/loopback.pro6
-rw-r--r--examples/network/loopback/main.cpp6
-rw-r--r--examples/network/network-chat/network-chat.desktop11
-rw-r--r--examples/network/network-chat/network-chat.pro4
-rw-r--r--examples/network/network.pro1
-rw-r--r--examples/network/qftp/ftpwindow.cpp8
-rw-r--r--examples/network/qftp/qftp.desktop11
-rw-r--r--examples/network/qftp/qftp.pro4
-rw-r--r--examples/network/securesocketclient/certificateinfo.cpp4
-rw-r--r--examples/network/securesocketclient/certificateinfo.ui68
-rw-r--r--examples/network/securesocketclient/main.cpp4
-rw-r--r--examples/network/securesocketclient/securesocketclient.desktop11
-rw-r--r--examples/network/securesocketclient/securesocketclient.pro3
-rw-r--r--examples/network/securesocketclient/sslclient.cpp7
-rw-r--r--examples/network/securesocketclient/sslclient.ui223
-rw-r--r--examples/network/securesocketclient/sslerrors.ui57
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp18
-rw-r--r--examples/network/threadedfortuneserver/dialog.h4
-rw-r--r--examples/network/threadedfortuneserver/main.cpp6
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.desktop11
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.pro9
-rw-r--r--examples/network/torrent/torrent.desktop11
-rw-r--r--examples/network/torrent/torrent.pro5
-rw-r--r--examples/opengl/2dpainting/2dpainting.desktop11
-rw-r--r--examples/opengl/2dpainting/2dpainting.pro4
-rw-r--r--examples/opengl/cube/cube.desktop11
-rw-r--r--examples/opengl/cube/cube.pngbin0 -> 30341 bytes
-rw-r--r--examples/opengl/cube/cube.pro40
-rw-r--r--examples/opengl/cube/fshader.glsl18
-rw-r--r--examples/opengl/cube/geometryengine.cpp130
-rw-r--r--examples/opengl/cube/geometryengine.h24
-rw-r--r--examples/opengl/cube/main.cpp22
-rw-r--r--examples/opengl/cube/mainwidget.cpp192
-rw-r--r--examples/opengl/cube/mainwidget.h53
-rw-r--r--examples/opengl/cube/shaders.qrc6
-rw-r--r--examples/opengl/cube/textures.qrc5
-rw-r--r--examples/opengl/cube/vshader.glsl24
-rw-r--r--examples/opengl/framebufferobject/framebufferobject.desktop11
-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.desktop11
-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.pro5
-rw-r--r--examples/opengl/grabber/grabber.desktop11
-rw-r--r--examples/opengl/grabber/grabber.pro5
-rw-r--r--examples/opengl/hellogl/hellogl.desktop11
-rw-r--r--examples/opengl/hellogl/hellogl.pro5
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.desktop11
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.pro8
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.desktop11
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.pro13
-rw-r--r--examples/opengl/opengl.pro2
-rw-r--r--examples/opengl/overpainting/overpainting.desktop11
-rw-r--r--examples/opengl/overpainting/overpainting.pro6
-rw-r--r--examples/opengl/pbuffers/pbuffers.desktop11
-rw-r--r--examples/opengl/pbuffers/pbuffers.pro6
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.desktop11
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.pro6
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.desktop11
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.pro5
-rw-r--r--examples/opengl/textures/textures.desktop11
-rw-r--r--examples/opengl/textures/textures.pro4
-rw-r--r--examples/openvg/openvg.desktop11
-rw-r--r--examples/openvg/openvg.pro1
-rw-r--r--examples/painting/basicdrawing/basicdrawing.desktop11
-rw-r--r--examples/painting/basicdrawing/basicdrawing.pro3
-rw-r--r--examples/painting/basicdrawing/main.cpp4
-rw-r--r--examples/painting/basicdrawing/window.cpp43
-rw-r--r--examples/painting/concentriccircles/concentriccircles.desktop11
-rw-r--r--examples/painting/concentriccircles/concentriccircles.pro2
-rw-r--r--examples/painting/concentriccircles/main.cpp4
-rw-r--r--examples/painting/fontsampler/fontsampler.desktop11
-rw-r--r--examples/painting/fontsampler/fontsampler.pro1
-rw-r--r--examples/painting/fontsampler/main.cpp4
-rw-r--r--examples/painting/fontsampler/mainwindow.cpp56
-rw-r--r--examples/painting/fontsampler/mainwindow.h4
-rw-r--r--examples/painting/fontsampler/mainwindowbase.ui126
-rw-r--r--examples/painting/imagecomposition/imagecomposer.cpp10
-rw-r--r--examples/painting/imagecomposition/imagecomposition.desktop11
-rw-r--r--examples/painting/imagecomposition/imagecomposition.pro2
-rw-r--r--examples/painting/imagecomposition/main.cpp4
-rw-r--r--examples/painting/painterpaths/main.cpp4
-rw-r--r--examples/painting/painterpaths/painterpaths.desktop11
-rw-r--r--examples/painting/painterpaths/painterpaths.pro2
-rw-r--r--examples/painting/painterpaths/window.cpp53
-rw-r--r--examples/painting/painterpaths/window.h4
-rw-r--r--examples/painting/painting.pro6
-rw-r--r--examples/painting/svggenerator/svggenerator.desktop11
-rw-r--r--examples/painting/svgviewer/svgviewer.desktop11
-rw-r--r--examples/painting/transformations/main.cpp4
-rw-r--r--examples/painting/transformations/transformations.desktop11
-rw-r--r--examples/painting/transformations/transformations.pro5
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.desktop11
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.pro3
-rw-r--r--examples/qtconcurrent/imagescaling/main.cpp21
-rw-r--r--examples/qtconcurrent/map/main.cpp19
-rw-r--r--examples/qtconcurrent/map/map.desktop11
-rw-r--r--examples/qtconcurrent/map/map.pro3
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp17
-rw-r--r--examples/qtconcurrent/progressdialog/progressdialog.desktop11
-rw-r--r--examples/qtconcurrent/progressdialog/progressdialog.pro4
-rw-r--r--examples/qtconcurrent/qtconcurrent.pro1
-rw-r--r--examples/qtconcurrent/runfunction/main.cpp19
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.desktop11
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.pro4
-rw-r--r--examples/qtconcurrent/wordcount/main.cpp23
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.desktop11
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.pro4
-rw-r--r--examples/qtestlib/qtestlib.pro1
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.desktop11
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.pro5
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.desktop11
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.pro5
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.desktop11
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.pro5
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.desktop11
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.pro5
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.desktop11
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.pro5
-rw-r--r--examples/qws/dbscreen/dbscreen.desktop11
-rw-r--r--examples/qws/dbscreen/dbscreen.pro4
-rw-r--r--examples/qws/framebuffer/framebuffer.desktop11
-rw-r--r--examples/qws/framebuffer/framebuffer.pro6
-rw-r--r--examples/qws/mousecalibration/mousecalibration.desktop11
-rw-r--r--examples/qws/mousecalibration/mousecalibration.pro7
-rw-r--r--examples/qws/simpledecoration/simpledecoration.desktop11
-rw-r--r--examples/qws/simpledecoration/simpledecoration.pro7
-rw-r--r--examples/qws/svgalib/svgalib.desktop11
-rw-r--r--examples/qws/svgalib/svgalib.pro6
-rw-r--r--examples/richtext/calendar/calendar.desktop11
-rw-r--r--examples/richtext/calendar/calendar.pro4
-rw-r--r--examples/richtext/calendar/main.cpp6
-rw-r--r--examples/richtext/calendar/mainwindow.cpp7
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp30
-rw-r--r--examples/richtext/orderform/main.cpp6
-rw-r--r--examples/richtext/orderform/orderform.desktop11
-rw-r--r--examples/richtext/orderform/orderform.pro1
-rw-r--r--examples/richtext/richtext.pro1
-rw-r--r--examples/richtext/syntaxhighlighter/main.cpp6
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.desktop11
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.pro2
-rw-r--r--examples/sql/cachedtable/cachedtable.desktop11
-rw-r--r--examples/sql/cachedtable/cachedtable.pro1
-rw-r--r--examples/sql/cachedtable/main.cpp6
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp3
-rw-r--r--examples/sql/cachedtable/tableeditor.h2
-rw-r--r--examples/sql/drilldown/drilldown.desktop11
-rw-r--r--examples/sql/drilldown/drilldown.pro3
-rw-r--r--examples/sql/drilldown/informationwindow.cpp6
-rw-r--r--examples/sql/drilldown/main.cpp2
-rw-r--r--examples/sql/drilldown/view.cpp2
-rw-r--r--examples/sql/masterdetail/main.cpp4
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp4
-rw-r--r--examples/sql/masterdetail/masterdetail.desktop11
-rw-r--r--examples/sql/masterdetail/masterdetail.pro5
-rw-r--r--examples/sql/querymodel/main.cpp27
-rw-r--r--examples/sql/querymodel/querymodel.desktop11
-rw-r--r--examples/sql/querymodel/querymodel.pro1
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.cpp4
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.desktop11
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.pro1
-rw-r--r--examples/sql/sql.pro1
-rw-r--r--examples/sql/sqlwidgetmapper/main.cpp4
-rw-r--r--examples/sql/sqlwidgetmapper/sqlwidgetmapper.desktop11
-rw-r--r--examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro3
-rw-r--r--examples/sql/tablemodel/tablemodel.cpp18
-rw-r--r--examples/sql/tablemodel/tablemodel.desktop11
-rw-r--r--examples/sql/tablemodel/tablemodel.pro1
-rw-r--r--examples/statemachine/eventtransitions/eventtransitions.desktop11
-rw-r--r--examples/statemachine/eventtransitions/eventtransitions.pro5
-rw-r--r--examples/statemachine/eventtransitions/main.cpp11
-rw-r--r--examples/statemachine/factorial/factorial.desktop11
-rw-r--r--examples/statemachine/factorial/factorial.pro5
-rw-r--r--examples/statemachine/pingpong/pingpong.desktop11
-rw-r--r--examples/statemachine/pingpong/pingpong.pro5
-rw-r--r--examples/statemachine/rogue/main.cpp4
-rw-r--r--examples/statemachine/rogue/movementtransition.h7
-rw-r--r--examples/statemachine/rogue/rogue.desktop11
-rw-r--r--examples/statemachine/rogue/rogue.pro3
-rw-r--r--examples/statemachine/rogue/window.cpp12
-rw-r--r--examples/statemachine/rogue/window.h5
-rw-r--r--examples/statemachine/trafficlight/main.cpp9
-rw-r--r--examples/statemachine/trafficlight/trafficlight.desktop11
-rw-r--r--examples/statemachine/trafficlight/trafficlight.pro4
-rw-r--r--examples/statemachine/twowaybutton/main.cpp6
-rw-r--r--examples/statemachine/twowaybutton/twowaybutton.desktop11
-rw-r--r--examples/statemachine/twowaybutton/twowaybutton.pro4
-rw-r--r--examples/threads/mandelbrot/main.cpp4
-rw-r--r--examples/threads/mandelbrot/mandelbrot.desktop11
-rw-r--r--examples/threads/mandelbrot/mandelbrot.pro1
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp18
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h30
-rw-r--r--examples/threads/queuedcustomtype/main.cpp4
-rw-r--r--examples/threads/queuedcustomtype/queuedcustomtype.desktop11
-rw-r--r--examples/threads/queuedcustomtype/queuedcustomtype.pro10
-rw-r--r--examples/threads/semaphores/semaphores.cpp81
-rw-r--r--examples/threads/semaphores/semaphores.desktop11
-rw-r--r--examples/threads/semaphores/semaphores.pro6
-rw-r--r--examples/threads/threads.pro1
-rw-r--r--examples/threads/waitconditions/waitconditions.cpp132
-rw-r--r--examples/threads/waitconditions/waitconditions.desktop11
-rw-r--r--examples/threads/waitconditions/waitconditions.pro5
-rw-r--r--examples/tools/codecs/codecs.desktop11
-rw-r--r--examples/tools/codecs/codecs.pro5
-rw-r--r--examples/tools/completer/completer.desktop11
-rw-r--r--examples/tools/completer/completer.pro5
-rw-r--r--examples/tools/contiguouscache/contiguouscache.desktop11
-rw-r--r--examples/tools/contiguouscache/contiguouscache.pro7
-rw-r--r--examples/tools/customcompleter/customcompleter.desktop11
-rw-r--r--examples/tools/customcompleter/customcompleter.pro5
-rw-r--r--examples/tools/customtype/customtype.desktop11
-rw-r--r--examples/tools/customtype/customtype.pro13
-rw-r--r--examples/tools/customtypesending/customtypesending.desktop11
-rw-r--r--examples/tools/customtypesending/customtypesending.pro13
-rw-r--r--examples/tools/echoplugin/echoplugin.pro1
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.desktop11
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.pro5
-rw-r--r--examples/tools/echoplugin/plugin/plugin.desktop11
-rw-r--r--examples/tools/echoplugin/plugin/plugin.pro10
-rw-r--r--examples/tools/i18n/i18n.desktop11
-rw-r--r--examples/tools/i18n/i18n.pro5
-rw-r--r--examples/tools/inputpanel/inputpanel.desktop11
-rw-r--r--examples/tools/inputpanel/inputpanel.pro5
-rw-r--r--examples/tools/plugandpaint/plugandpaint.desktop11
-rw-r--r--examples/tools/plugandpaint/plugandpaint.pro5
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictools.pro1
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro1
-rw-r--r--examples/tools/plugandpaintplugins/plugandpaintplugins.pro1
-rw-r--r--examples/tools/regexp/regexp.desktop11
-rw-r--r--examples/tools/regexp/regexp.pro5
-rw-r--r--examples/tools/settingseditor/settingseditor.desktop11
-rw-r--r--examples/tools/settingseditor/settingseditor.pro5
-rw-r--r--examples/tools/styleplugin/plugin/plugin.pro1
-rw-r--r--examples/tools/styleplugin/styleplugin.pro1
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.pro1
-rw-r--r--examples/tools/tools.pro1
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.desktop11
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.pro5
-rw-r--r--examples/tools/undoframework/undoframework.desktop11
-rw-r--r--examples/tools/undoframework/undoframework.pro5
-rw-r--r--examples/touch/dials/dials.desktop11
-rw-r--r--examples/touch/dials/dials.pro7
-rw-r--r--examples/touch/fingerpaint/fingerpaint.desktop11
-rw-r--r--examples/touch/fingerpaint/fingerpaint.pro7
-rw-r--r--examples/touch/knobs/knobs.desktop11
-rw-r--r--examples/touch/knobs/knobs.pro7
-rw-r--r--examples/touch/pinchzoom/pinchzoom.desktop11
-rw-r--r--examples/touch/pinchzoom/pinchzoom.pro7
-rw-r--r--examples/tutorials/addressbook-fr/addressbook-fr.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part1/part1.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part1/part1.pro7
-rw-r--r--examples/tutorials/addressbook-fr/part2/part2.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part2/part2.pro7
-rw-r--r--examples/tutorials/addressbook-fr/part3/part3.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part3/part3.pro7
-rw-r--r--examples/tutorials/addressbook-fr/part4/part4.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part4/part4.pro7
-rw-r--r--examples/tutorials/addressbook-fr/part5/part5.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part5/part5.pro7
-rw-r--r--examples/tutorials/addressbook-fr/part6/part6.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part6/part6.pro7
-rw-r--r--examples/tutorials/addressbook-fr/part7/part7.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part7/part7.pro7
-rw-r--r--examples/tutorials/addressbook/addressbook.pro1
-rw-r--r--examples/tutorials/addressbook/part1/part1.desktop11
-rw-r--r--examples/tutorials/addressbook/part1/part1.pro5
-rw-r--r--examples/tutorials/addressbook/part2/part2.desktop11
-rw-r--r--examples/tutorials/addressbook/part2/part2.pro5
-rw-r--r--examples/tutorials/addressbook/part3/part3.desktop11
-rw-r--r--examples/tutorials/addressbook/part3/part3.pro5
-rw-r--r--examples/tutorials/addressbook/part4/part4.desktop11
-rw-r--r--examples/tutorials/addressbook/part4/part4.pro5
-rw-r--r--examples/tutorials/addressbook/part5/part5.desktop11
-rw-r--r--examples/tutorials/addressbook/part5/part5.pro5
-rw-r--r--examples/tutorials/addressbook/part6/part6.desktop11
-rw-r--r--examples/tutorials/addressbook/part6/part6.pro5
-rw-r--r--examples/tutorials/addressbook/part7/part7.desktop11
-rw-r--r--examples/tutorials/addressbook/part7/part7.pro5
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part1/part1.pro8
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part2/part2.pro9
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part3/part3.pro9
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part4/part4.pro9
-rwxr-xr-xexamples/tutorials/gettingStarted/gsQt/part5/part5.pro9
-rw-r--r--examples/tutorials/modelview/1_readonly/1_readonly.desktop11
-rwxr-xr-xexamples/tutorials/modelview/1_readonly/1_readonly.pro5
-rw-r--r--examples/tutorials/modelview/2_formatting/2_formatting.desktop11
-rwxr-xr-xexamples/tutorials/modelview/2_formatting/2_formatting.pro5
-rw-r--r--examples/tutorials/modelview/3_changingmodel/3_changingmodel.desktop11
-rwxr-xr-xexamples/tutorials/modelview/3_changingmodel/3_changingmodel.pro5
-rw-r--r--examples/tutorials/modelview/4_headers/4_headers.desktop11
-rwxr-xr-xexamples/tutorials/modelview/4_headers/4_headers.pro5
-rw-r--r--examples/tutorials/modelview/5_edit/5_edit.desktop11
-rwxr-xr-xexamples/tutorials/modelview/5_edit/5_edit.pro5
-rw-r--r--examples/tutorials/modelview/6_treeview/6_treeview.desktop11
-rwxr-xr-xexamples/tutorials/modelview/6_treeview/6_treeview.pro5
-rw-r--r--examples/tutorials/modelview/7_selections/7_selections.desktop11
-rwxr-xr-xexamples/tutorials/modelview/7_selections/7_selections.pro5
-rwxr-xr-xexamples/tutorials/modelview/modelview.pro1
-rw-r--r--examples/tutorials/widgets/childwidget/childwidget.desktop11
-rw-r--r--examples/tutorials/widgets/childwidget/childwidget.pro7
-rw-r--r--examples/tutorials/widgets/nestedlayouts/nestedlayouts.desktop11
-rw-r--r--examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro7
-rw-r--r--examples/tutorials/widgets/toplevel/toplevel.desktop11
-rw-r--r--examples/tutorials/widgets/toplevel/toplevel.pro7
-rw-r--r--examples/tutorials/widgets/windowlayout/windowlayout.desktop11
-rw-r--r--examples/tutorials/widgets/windowlayout/windowlayout.pro7
-rw-r--r--examples/uitools/multipleinheritance/main.cpp4
-rw-r--r--examples/uitools/multipleinheritance/multipleinheritance.desktop11
-rw-r--r--examples/uitools/multipleinheritance/multipleinheritance.pro2
-rw-r--r--examples/uitools/textfinder/textfinder.desktop11
-rw-r--r--examples/uitools/textfinder/textfinder.pro4
-rw-r--r--examples/uitools/uitools.pro1
-rw-r--r--examples/widgets/analogclock/analogclock.desktop11
-rw-r--r--examples/widgets/analogclock/analogclock.pro2
-rw-r--r--examples/widgets/analogclock/main.cpp4
-rw-r--r--examples/widgets/applicationicon/applicationicon.desktop11
-rw-r--r--examples/widgets/applicationicon/applicationicon.pngbin0 -> 4023 bytes
-rw-r--r--examples/widgets/applicationicon/applicationicon.pro30
-rw-r--r--examples/widgets/calculator/calculator.cpp7
-rw-r--r--examples/widgets/calculator/calculator.desktop11
-rw-r--r--examples/widgets/calculator/calculator.h4
-rw-r--r--examples/widgets/calculator/calculator.pro2
-rw-r--r--examples/widgets/calculator/main.cpp4
-rw-r--r--examples/widgets/calculator/releasenotes.txt4
-rw-r--r--examples/widgets/calendarwidget/calendarwidget.desktop11
-rw-r--r--examples/widgets/calendarwidget/calendarwidget.pro5
-rw-r--r--examples/widgets/charactermap/charactermap.desktop11
-rw-r--r--examples/widgets/charactermap/charactermap.pro5
-rw-r--r--examples/widgets/codeeditor/codeeditor.desktop11
-rw-r--r--examples/widgets/codeeditor/codeeditor.pro5
-rw-r--r--examples/widgets/codeeditor/main.cpp4
-rw-r--r--examples/widgets/digitalclock/digitalclock.desktop11
-rw-r--r--examples/widgets/digitalclock/digitalclock.pro1
-rw-r--r--examples/widgets/digitalclock/main.cpp4
-rw-r--r--examples/widgets/elidedlabel/elidedlabel.desktop11
-rw-r--r--examples/widgets/elidedlabel/elidedlabel.pro31
-rw-r--r--examples/widgets/groupbox/groupbox.desktop11
-rw-r--r--examples/widgets/groupbox/groupbox.pro5
-rw-r--r--examples/widgets/groupbox/main.cpp4
-rw-r--r--examples/widgets/icons/icons.desktop11
-rw-r--r--examples/widgets/icons/icons.pro5
-rw-r--r--examples/widgets/icons/main.cpp4
-rw-r--r--examples/widgets/imageviewer/imageviewer.desktop11
-rw-r--r--examples/widgets/imageviewer/imageviewer.pro8
-rw-r--r--examples/widgets/imageviewer/main.cpp4
-rw-r--r--examples/widgets/lineedits/lineedits.desktop11
-rw-r--r--examples/widgets/lineedits/lineedits.pro5
-rw-r--r--examples/widgets/lineedits/main.cpp4
-rw-r--r--examples/widgets/maemovibration/buttonwidget.cpp26
-rw-r--r--examples/widgets/maemovibration/buttonwidget.h24
-rw-r--r--examples/widgets/maemovibration/data/48x48/maemovibration.pngbin0 -> 2406 bytes
-rw-r--r--examples/widgets/maemovibration/data/64x64/maemovibration.pngbin0 -> 2989 bytes
-rw-r--r--examples/widgets/maemovibration/data/maemovibration.desktop12
-rw-r--r--examples/widgets/maemovibration/data/maemovibration.service3
-rw-r--r--examples/widgets/maemovibration/maemovibration.pro52
-rw-r--r--examples/widgets/maemovibration/main.cpp44
-rw-r--r--examples/widgets/maemovibration/mcevibrator.cpp79
-rw-r--r--examples/widgets/maemovibration/mcevibrator.h31
-rw-r--r--examples/widgets/movie/main.cpp5
-rw-r--r--examples/widgets/movie/movie.desktop11
-rw-r--r--examples/widgets/movie/movie.pro5
-rw-r--r--examples/widgets/orientation/image_a.pngbin0 -> 1075 bytes
-rw-r--r--examples/widgets/orientation/image_b.pngbin0 -> 1020 bytes
-rw-r--r--examples/widgets/orientation/image_c.pngbin0 -> 1163 bytes
-rw-r--r--examples/widgets/orientation/images.qrc7
-rw-r--r--examples/widgets/orientation/landscape.ui114
-rw-r--r--examples/widgets/orientation/main.cpp15
-rw-r--r--examples/widgets/orientation/mainwindow.cpp75
-rw-r--r--examples/widgets/orientation/mainwindow.h33
-rw-r--r--examples/widgets/orientation/orientation.desktop11
-rw-r--r--examples/widgets/orientation/orientation.pro30
-rw-r--r--examples/widgets/orientation/portrait.ui61
-rw-r--r--examples/widgets/scribble/main.cpp4
-rw-r--r--examples/widgets/scribble/scribble.desktop11
-rw-r--r--examples/widgets/scribble/scribble.pro1
-rw-r--r--examples/widgets/shapedclock/main.cpp4
-rw-r--r--examples/widgets/shapedclock/shapedclock.desktop11
-rw-r--r--examples/widgets/shapedclock/shapedclock.pro4
-rw-r--r--examples/widgets/sliders/main.cpp4
-rw-r--r--examples/widgets/sliders/sliders.desktop11
-rw-r--r--examples/widgets/sliders/sliders.pro5
-rw-r--r--examples/widgets/softkeys/softkeys.desktop11
-rw-r--r--examples/widgets/softkeys/softkeys.pro2
-rw-r--r--examples/widgets/spinboxes/main.cpp4
-rw-r--r--examples/widgets/spinboxes/spinboxes.desktop11
-rw-r--r--examples/widgets/spinboxes/spinboxes.pro5
-rw-r--r--examples/widgets/styles/styles.desktop11
-rw-r--r--examples/widgets/styles/styles.pro5
-rw-r--r--examples/widgets/stylesheet/main.cpp4
-rw-r--r--examples/widgets/stylesheet/stylesheet.desktop11
-rw-r--r--examples/widgets/stylesheet/stylesheet.pro5
-rw-r--r--examples/widgets/symbianvibration/main.cpp14
-rw-r--r--examples/widgets/symbianvibration/mainwindow.cpp23
-rw-r--r--examples/widgets/symbianvibration/mainwindow.h23
-rw-r--r--examples/widgets/symbianvibration/symbianvibration.pro39
-rw-r--r--examples/widgets/symbianvibration/vibrationsurface.cpp117
-rw-r--r--examples/widgets/symbianvibration/vibrationsurface.h31
-rw-r--r--examples/widgets/symbianvibration/xqvibra.cpp170
-rw-r--r--examples/widgets/symbianvibration/xqvibra.h61
-rw-r--r--examples/widgets/symbianvibration/xqvibra_p.cpp131
-rw-r--r--examples/widgets/symbianvibration/xqvibra_p.h39
-rw-r--r--examples/widgets/tablet/main.cpp7
-rw-r--r--examples/widgets/tablet/tablet.desktop11
-rw-r--r--examples/widgets/tablet/tablet.pro5
-rw-r--r--examples/widgets/tetrix/main.cpp4
-rw-r--r--examples/widgets/tetrix/tetrix.desktop11
-rw-r--r--examples/widgets/tetrix/tetrix.pro2
-rw-r--r--examples/widgets/tooltips/main.cpp4
-rw-r--r--examples/widgets/tooltips/tooltips.desktop11
-rw-r--r--examples/widgets/tooltips/tooltips.pro1
-rw-r--r--examples/widgets/validators/main.cpp4
-rw-r--r--examples/widgets/validators/validators.desktop11
-rw-r--r--examples/widgets/validators/validators.pro5
-rw-r--r--examples/widgets/widgets.pro9
-rw-r--r--examples/widgets/wiggly/main.cpp4
-rw-r--r--examples/widgets/wiggly/wiggly.desktop11
-rw-r--r--examples/widgets/wiggly/wiggly.pro2
-rw-r--r--examples/widgets/windowflags/main.cpp4
-rw-r--r--examples/widgets/windowflags/windowflags.desktop11
-rw-r--r--examples/widgets/windowflags/windowflags.pro5
-rw-r--r--examples/xml/dombookmarks/dombookmarks.desktop11
-rw-r--r--examples/xml/dombookmarks/dombookmarks.pro15
-rw-r--r--examples/xml/dombookmarks/main.cpp5
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp18
-rw-r--r--examples/xml/htmlinfo/htmlinfo.desktop11
-rw-r--r--examples/xml/htmlinfo/htmlinfo.pro7
-rw-r--r--examples/xml/htmlinfo/main.cpp5
-rw-r--r--examples/xml/htmlinfo/resources.qrc11
-rw-r--r--examples/xml/rsslisting/main.cpp4
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp20
-rw-r--r--examples/xml/rsslisting/rsslisting.desktop11
-rw-r--r--examples/xml/rsslisting/rsslisting.h15
-rw-r--r--examples/xml/rsslisting/rsslisting.pro12
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.desktop11
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.pro2
-rw-r--r--examples/xml/streambookmarks/main.cpp3
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp18
-rw-r--r--examples/xml/streambookmarks/streambookmarks.desktop11
-rw-r--r--examples/xml/streambookmarks/streambookmarks.pro8
-rw-r--r--examples/xml/xml.pro1
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.desktop11
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.pro4
748 files changed, 7631 insertions, 638 deletions
diff --git a/examples/animation/animatedtiles/animatedtiles.desktop b/examples/animation/animatedtiles/animatedtiles.desktop
new file mode 100644
index 0000000000..97e646fdf8
--- /dev/null
+++ b/examples/animation/animatedtiles/animatedtiles.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Animated Tiles
+Exec=/opt/usr/bin/animatedtiles
+Icon=animatedtiles
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/animation/animatedtiles/animatedtiles.pro b/examples/animation/animatedtiles/animatedtiles.pro
index ba0482e71b..77a9b55597 100644
--- a/examples/animation/animatedtiles/animatedtiles.pro
+++ b/examples/animation/animatedtiles/animatedtiles.pro
@@ -12,3 +12,4 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/animation/animatedtiles/main.cpp b/examples/animation/animatedtiles/main.cpp
index 55dbd39ec1..c59c981cb1 100644
--- a/examples/animation/animatedtiles/main.cpp
+++ b/examples/animation/animatedtiles/main.cpp
@@ -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);
diff --git a/examples/animation/appchooser/appchooser.desktop b/examples/animation/appchooser/appchooser.desktop
new file mode 100644
index 0000000000..8e413e96c2
--- /dev/null
+++ b/examples/animation/appchooser/appchooser.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Application Chooser
+Exec=/opt/usr/bin/appchooser
+Icon=appchooser
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/animation/appchooser/appchooser.pro b/examples/animation/appchooser/appchooser.pro
index 557c764331..0fb1aa6829 100644
--- a/examples/animation/appchooser/appchooser.pro
+++ b/examples/animation/appchooser/appchooser.pro
@@ -12,3 +12,4 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/animation/appchooser/main.cpp b/examples/animation/appchooser/main.cpp
index ac801dde78..0a54842ef2 100644
--- a/examples/animation/appchooser/main.cpp
+++ b/examples/animation/appchooser/main.cpp
@@ -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();
}
diff --git a/examples/animation/easing/easing.desktop b/examples/animation/easing/easing.desktop
new file mode 100644
index 0000000000..56d122217a
--- /dev/null
+++ b/examples/animation/easing/easing.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Easing Curves
+Exec=/opt/usr/bin/easing
+Icon=easing
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/animation/easing/easing.pro b/examples/animation/easing/easing.pro
index 402e61e714..b26ce30083 100644
--- a/examples/animation/easing/easing.pro
+++ b/examples/animation/easing/easing.pro
@@ -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
@@ -18,3 +18,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+
+maemo5: CONFIG += qt_example
diff --git a/examples/animation/easing/form.ui b/examples/animation/easing/form.ui
index b60ade86a4..364aebeda6 100644
--- a/examples/animation/easing/form.ui
+++ b/examples/animation/easing/form.ui
@@ -49,12 +49,27 @@
<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>
@@ -66,8 +81,14 @@
</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>
@@ -96,6 +117,18 @@
</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>
@@ -106,6 +139,18 @@
<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>
@@ -117,18 +162,17 @@
</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>
@@ -140,18 +184,30 @@
</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>
@@ -163,6 +219,19 @@
</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>
diff --git a/examples/animation/easing/main.cpp b/examples/animation/easing/main.cpp
index 72fa2d0a8d..0d63a3136e 100644
--- a/examples/animation/easing/main.cpp
+++ b/examples/animation/easing/main.cpp
@@ -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();
}
diff --git a/examples/animation/easing/window.cpp b/examples/animation/easing/window.cpp
index b466cec3d0..869bca4798 100644
--- a/examples/animation/easing/window.cpp
+++ b/examples/animation/easing/window.cpp
@@ -41,7 +41,12 @@
#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
diff --git a/examples/animation/easing/window.h b/examples/animation/easing/window.h
index 1630b5d39f..51fa00d859 100644
--- a/examples/animation/easing/window.h
+++ b/examples/animation/easing/window.h
@@ -73,6 +73,4 @@ private:
PixmapItem *m_item;
Animation *m_anim;
QSize m_iconSize;
-
-
};
diff --git a/examples/animation/moveblocks/main.cpp b/examples/animation/moveblocks/main.cpp
index 4e4bd554fe..24e5f051d7 100644
--- a/examples/animation/moveblocks/main.cpp
+++ b/examples/animation/moveblocks/main.cpp
@@ -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()));
diff --git a/examples/animation/moveblocks/moveblocks.desktop b/examples/animation/moveblocks/moveblocks.desktop
new file mode 100644
index 0000000000..4100f448df
--- /dev/null
+++ b/examples/animation/moveblocks/moveblocks.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Move Blocks
+Exec=/opt/usr/bin/moveblocks
+Icon=moveblocks
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/animation/moveblocks/moveblocks.pro b/examples/animation/moveblocks/moveblocks.pro
index 4c807e9d9c..f127148793 100644
--- a/examples/animation/moveblocks/moveblocks.pro
+++ b/examples/animation/moveblocks/moveblocks.pro
@@ -11,3 +11,4 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/animation/states/main.cpp b/examples/animation/states/main.cpp
index eabbf7d4a7..631ec973f7 100644
--- a/examples/animation/states/main.cpp
+++ b/examples/animation/states/main.cpp
@@ -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();
}
diff --git a/examples/animation/states/states.desktop b/examples/animation/states/states.desktop
new file mode 100644
index 0000000000..8429979f23
--- /dev/null
+++ b/examples/animation/states/states.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=States
+Exec=/opt/usr/bin/states
+Icon=states
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/animation/states/states.pro b/examples/animation/states/states.pro
index 27de30d63a..18dc7ac29e 100644
--- a/examples/animation/states/states.pro
+++ b/examples/animation/states/states.pro
@@ -12,3 +12,4 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp
index e83a6e10f2..a42dd1600b 100644
--- a/examples/animation/stickman/graphicsview.cpp
+++ b/examples/animation/stickman/graphicsview.cpp
@@ -54,4 +54,7 @@ void GraphicsView::keyPressEvent(QKeyEvent *e)
emit keyPressed(Qt::Key(e->key()));
}
-
+void GraphicsView::resizeEvent(QResizeEvent *event)
+{
+ fitInView(scene()->sceneRect());
+}
diff --git a/examples/animation/stickman/graphicsview.h b/examples/animation/stickman/graphicsview.h
index 5c93792f7b..abd621df43 100644
--- a/examples/animation/stickman/graphicsview.h
+++ b/examples/animation/stickman/graphicsview.h
@@ -51,6 +51,7 @@ public:
GraphicsView(QWidget *parent = 0);
protected:
+ virtual void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent *);
signals:
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index 3b18038fee..791b33eb2e 100644
--- a/examples/animation/stickman/lifecycle.cpp
+++ b/examples/animation/stickman/lifecycle.cpp
@@ -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)
diff --git a/examples/animation/stickman/lifecycle.h b/examples/animation/stickman/lifecycle.h
index 1bf3661f6c..ca1a052c39 100644
--- a/examples/animation/stickman/lifecycle.h
+++ b/examples/animation/stickman/lifecycle.h
@@ -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();
diff --git a/examples/animation/stickman/main.cpp b/examples/animation/stickman/main.cpp
index 9ad7caa050..c5c3eb316b 100644
--- a/examples/animation/stickman/main.cpp
+++ b/examples/animation/stickman/main.cpp
@@ -43,6 +43,7 @@
#include "lifecycle.h"
#include "stickman.h"
#include "graphicsview.h"
+#include "rectbutton.h"
#include <QtCore>
#include <QtWidgets>
@@ -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();
}
diff --git a/examples/animation/stickman/rectbutton.cpp b/examples/animation/stickman/rectbutton.cpp
new file mode 100644
index 0000000000..f8b00daa9d
--- /dev/null
+++ b/examples/animation/stickman/rectbutton.cpp
@@ -0,0 +1,33 @@
+#include "rectbutton.h"
+#include <QPainter>
+
+RectButton::RectButton(QString buttonText) : m_ButtonText(buttonText)
+{
+}
+
+
+RectButton::~RectButton()
+{
+}
+
+
+void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *event)
+{
+ emit clicked();
+}
+
+
+QRectF RectButton::boundingRect() const
+{
+ return QRectF(0.0, 0.0, 90.0, 40.0);
+}
+
+
+void RectButton::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ painter->setBrush(Qt::gray);
+ painter->drawRoundedRect(boundingRect(), 5, 5);
+
+ painter->setPen(Qt::white);
+ painter->drawText(20, 25, m_ButtonText);
+}
diff --git a/examples/animation/stickman/rectbutton.h b/examples/animation/stickman/rectbutton.h
new file mode 100644
index 0000000000..95ca2e2a21
--- /dev/null
+++ b/examples/animation/stickman/rectbutton.h
@@ -0,0 +1,25 @@
+#ifndef RECTBUTTON_H
+#define RECTBUTTON_H
+
+#include <QGraphicsObject>
+
+class RectButton : public QGraphicsObject
+{
+ Q_OBJECT
+public:
+ RectButton(QString buttonText);
+ ~RectButton();
+
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+protected:
+ QString m_ButtonText;
+
+ virtual void mousePressEvent (QGraphicsSceneMouseEvent *event);
+
+signals:
+ void clicked();
+};
+
+#endif // RECTBUTTON_H
diff --git a/examples/animation/stickman/stickman.desktop b/examples/animation/stickman/stickman.desktop
new file mode 100644
index 0000000000..1722d4db3e
--- /dev/null
+++ b/examples/animation/stickman/stickman.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Stickman
+Exec=/opt/usr/bin/stickman
+Icon=stickman
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/animation/stickman/stickman.pro b/examples/animation/stickman/stickman.pro
index 2d899cd2ff..c0e180e741 100644
--- a/examples/animation/stickman/stickman.pro
+++ b/examples/animation/stickman/stickman.pro
@@ -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
@@ -23,3 +25,4 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/dbus/complexpingpong/complexping.desktop b/examples/dbus/complexpingpong/complexping.desktop
new file mode 100644
index 0000000000..0075856c74
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Complex Ping
+Exec=/opt/usr/bin/complexping
+Icon=complexping
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/complexpingpong/complexping.pro b/examples/dbus/complexpingpong/complexping.pro
index de4ed61f79..c84ef081e4 100644
--- a/examples/dbus/complexpingpong/complexping.pro
+++ b/examples/dbus/complexpingpong/complexping.pro
@@ -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)
diff --git a/examples/dbus/complexpingpong/complexpong.desktop b/examples/dbus/complexpingpong/complexpong.desktop
new file mode 100644
index 0000000000..2af77c54de
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Complex Pong
+Exec=/opt/usr/bin/complexpong
+Icon=complexpong
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/complexpingpong/complexpong.pro b/examples/dbus/complexpingpong/complexpong.pro
index b3a2e75e37..a9ca7cab94 100644
--- a/examples/dbus/complexpingpong/complexpong.pro
+++ b/examples/dbus/complexpingpong/complexpong.pro
@@ -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)
diff --git a/examples/dbus/dbus-chat/dbus-chat.desktop b/examples/dbus/dbus-chat/dbus-chat.desktop
new file mode 100644
index 0000000000..d25c82e4ce
--- /dev/null
+++ b/examples/dbus/dbus-chat/dbus-chat.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=D-Bus Chat
+Exec=/opt/usr/bin/dbus-chat
+Icon=dbus-chat
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro
index 34a1c4dc94..3009045e78 100644
--- a/examples/dbus/dbus-chat/dbus-chat.pro
+++ b/examples/dbus/dbus-chat/dbus-chat.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += qdbus
@@ -20,3 +19,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro
index e79765b82b..b3c05597d4 100644
--- a/examples/dbus/dbus.pro
+++ b/examples/dbus/dbus.pro
@@ -16,3 +16,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/dbus/listnames/listnames.desktop b/examples/dbus/listnames/listnames.desktop
new file mode 100644
index 0000000000..4b2047f32a
--- /dev/null
+++ b/examples/dbus/listnames/listnames.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=D-Bus List Names
+Exec=/opt/usr/bin/listnames
+Icon=listnames
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/listnames/listnames.pro b/examples/dbus/listnames/listnames.pro
index f633f10c11..dc9c26e8c7 100644
--- a/examples/dbus/listnames/listnames.pro
+++ b/examples/dbus/listnames/listnames.pro
@@ -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)
diff --git a/examples/dbus/pingpong/ping.desktop b/examples/dbus/pingpong/ping.desktop
new file mode 100644
index 0000000000..b80ea8862a
--- /dev/null
+++ b/examples/dbus/pingpong/ping.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=D-Bus Ping
+Exec=/opt/usr/bin/ping
+Icon=ping
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/pingpong/ping.pro b/examples/dbus/pingpong/ping.pro
index 66fc196462..9d3f2da84b 100644
--- a/examples/dbus/pingpong/ping.pro
+++ b/examples/dbus/pingpong/ping.pro
@@ -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)
diff --git a/examples/dbus/pingpong/pong.desktop b/examples/dbus/pingpong/pong.desktop
new file mode 100644
index 0000000000..4b5ddc8eae
--- /dev/null
+++ b/examples/dbus/pingpong/pong.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=D-Bus Pong
+Exec=/opt/usr/bin/pong
+Icon=pong
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/pingpong/pong.pro b/examples/dbus/pingpong/pong.pro
index afd5f51776..f82be77191 100644
--- a/examples/dbus/pingpong/pong.pro
+++ b/examples/dbus/pingpong/pong.pro
@@ -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)
diff --git a/examples/dbus/remotecontrolledcar/car/car.desktop b/examples/dbus/remotecontrolledcar/car/car.desktop
new file mode 100644
index 0000000000..ab2c53be0e
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=D-Bus Remote Controlled Car
+Exec=/opt/usr/bin/car
+Icon=car
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro
index 11b8498b0a..7ae919ceca 100644
--- a/examples/dbus/remotecontrolledcar/car/car.pro
+++ b/examples/dbus/remotecontrolledcar/car/car.pro
@@ -3,7 +3,6 @@
######################################################################
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += qdbus
@@ -21,3 +20,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.desktop b/examples/dbus/remotecontrolledcar/controller/controller.desktop
new file mode 100644
index 0000000000..1ae6aa178e
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=D-Bus Remote Controller
+Exec=/opt/usr/bin/controller
+Icon=controller
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
index a82ab0f470..5e8a82e8a0 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.pro
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -3,7 +3,6 @@
######################################################################
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += qdbus
@@ -22,3 +21,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
index f9c853fc2d..2959170c89 100644
--- a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
+++ b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
@@ -9,3 +9,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/desktop/desktop.pro b/examples/desktop/desktop.pro
index e99d4599fc..02d3ec8888 100644
--- a/examples/desktop/desktop.pro
+++ b/examples/desktop/desktop.pro
@@ -10,3 +10,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/desktop/screenshot/screenshot.desktop b/examples/desktop/screenshot/screenshot.desktop
new file mode 100644
index 0000000000..236d360123
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Screenshot
+Exec=/opt/usr/bin/screenshot
+Icon=screenshot
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/desktop/screenshot/screenshot.pro b/examples/desktop/screenshot/screenshot.pro
index 426b77dd95..1402ad42b9 100644
--- a/examples/desktop/screenshot/screenshot.pro
+++ b/examples/desktop/screenshot/screenshot.pro
@@ -10,3 +10,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/desktop/systray/systray.desktop b/examples/desktop/systray/systray.desktop
new file mode 100644
index 0000000000..0490e71548
--- /dev/null
+++ b/examples/desktop/systray/systray.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=System Tray Icon
+Exec=/opt/usr/bin/systray
+Icon=systray
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/classwizard/classwizard.desktop b/examples/dialogs/classwizard/classwizard.desktop
new file mode 100644
index 0000000000..7f7d232092
--- /dev/null
+++ b/examples/dialogs/classwizard/classwizard.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Class Wizard
+Exec=/opt/usr/bin/classwizard
+Icon=classwizard
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/classwizard/classwizard.pro b/examples/dialogs/classwizard/classwizard.pro
index b233b44dc7..6dd1cac37c 100644
--- a/examples/dialogs/classwizard/classwizard.pro
+++ b/examples/dialogs/classwizard/classwizard.pro
@@ -11,3 +11,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/dialogs/configdialog/configdialog.desktop b/examples/dialogs/configdialog/configdialog.desktop
new file mode 100644
index 0000000000..11a326813a
--- /dev/null
+++ b/examples/dialogs/configdialog/configdialog.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Config Dialog
+Exec=/opt/usr/bin/configdialog
+Icon=configdialog
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/configdialog/configdialog.pro b/examples/dialogs/configdialog/configdialog.pro
index 9eee58d568..de396bd0d5 100644
--- a/examples/dialogs/configdialog/configdialog.pro
+++ b/examples/dialogs/configdialog/configdialog.pro
@@ -15,3 +15,7 @@ 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
QT += widgets
+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)
diff --git a/examples/dialogs/dialogs.pro b/examples/dialogs/dialogs.pro
index f5f3c114ec..47444c10f1 100644
--- a/examples/dialogs/dialogs.pro
+++ b/examples/dialogs/dialogs.pro
@@ -18,3 +18,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/dialogs/extension/extension.desktop b/examples/dialogs/extension/extension.desktop
new file mode 100644
index 0000000000..374b1c8340
--- /dev/null
+++ b/examples/dialogs/extension/extension.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Extension
+Exec=/opt/usr/bin/extension
+Icon=extension
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/extension/extension.pro b/examples/dialogs/extension/extension.pro
index 492b18b4d9..5511f37150 100644
--- a/examples/dialogs/extension/extension.pro
+++ b/examples/dialogs/extension/extension.pro
@@ -10,3 +10,5 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/dialogs/extension/finddialog.cpp b/examples/dialogs/extension/finddialog.cpp
index 0b41a8a1e5..0e797edf81 100644
--- a/examples/dialogs/extension/finddialog.cpp
+++ b/examples/dialogs/extension/finddialog.cpp
@@ -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"));
diff --git a/examples/dialogs/extension/main.cpp b/examples/dialogs/extension/main.cpp
index d487faab69..9937b6d0b5 100644
--- a/examples/dialogs/extension/main.cpp
+++ b/examples/dialogs/extension/main.cpp
@@ -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();
}
diff --git a/examples/dialogs/findfiles/findfiles.desktop b/examples/dialogs/findfiles/findfiles.desktop
new file mode 100644
index 0000000000..04c91cd76d
--- /dev/null
+++ b/examples/dialogs/findfiles/findfiles.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Find Files
+Exec=/opt/usr/bin/findfiles
+Icon=findfiles
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/findfiles/findfiles.pro b/examples/dialogs/findfiles/findfiles.pro
index 352daef509..c19d47e271 100644
--- a/examples/dialogs/findfiles/findfiles.pro
+++ b/examples/dialogs/findfiles/findfiles.pro
@@ -10,3 +10,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/dialogs/findfiles/main.cpp b/examples/dialogs/findfiles/main.cpp
index f2079f511b..c5a324a452 100644
--- a/examples/dialogs/findfiles/main.cpp
+++ b/examples/dialogs/findfiles/main.cpp
@@ -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();
}
diff --git a/examples/dialogs/findfiles/window.cpp b/examples/dialogs/findfiles/window.cpp
index 42d6fc13ea..d2ffd0988e 100644
--- a/examples/dialogs/findfiles/window.cpp
+++ b/examples/dialogs/findfiles/window.cpp
@@ -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();
diff --git a/examples/dialogs/findfiles/window.h b/examples/dialogs/findfiles/window.h
index 73b065233b..4dbb446e18 100644
--- a/examples/dialogs/findfiles/window.h
+++ b/examples/dialogs/findfiles/window.h
@@ -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
diff --git a/examples/dialogs/licensewizard/licensewizard.desktop b/examples/dialogs/licensewizard/licensewizard.desktop
new file mode 100644
index 0000000000..423d81e9b3
--- /dev/null
+++ b/examples/dialogs/licensewizard/licensewizard.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=License Wizard
+Exec=/opt/usr/bin/licensewizard
+Icon=licensewizard
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/licensewizard/licensewizard.pro b/examples/dialogs/licensewizard/licensewizard.pro
index 82cdf73d7d..e3d0e7af04 100644
--- a/examples/dialogs/licensewizard/licensewizard.pro
+++ b/examples/dialogs/licensewizard/licensewizard.pro
@@ -11,3 +11,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/dialogs/sipdialog/sipdialog.desktop b/examples/dialogs/sipdialog/sipdialog.desktop
new file mode 100644
index 0000000000..b9c9955339
--- /dev/null
+++ b/examples/dialogs/sipdialog/sipdialog.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=SIP Dialog
+Exec=/opt/usr/bin/sipdialog
+Icon=sipdialog
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/sipdialog/sipdialog.pro b/examples/dialogs/sipdialog/sipdialog.pro
index 5d2fd6169c..937d2141e8 100644
--- a/examples/dialogs/sipdialog/sipdialog.pro
+++ b/examples/dialogs/sipdialog/sipdialog.pro
@@ -13,3 +13,8 @@ wince50standard-x86-msvc2005: LIBS += libcmt.lib corelibc.lib ole32.lib oleaut32
QT += widgets
+
+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)
diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp
index 20639e5f0e..28fdaaad80 100644
--- a/examples/dialogs/standarddialogs/dialog.cpp
+++ b/examples/dialogs/standarddialogs/dialog.cpp
@@ -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"));
}
diff --git a/examples/dialogs/standarddialogs/dialog.h b/examples/dialogs/standarddialogs/dialog.h
index 9af17d130b..506fc00f90 100644
--- a/examples/dialogs/standarddialogs/dialog.h
+++ b/examples/dialogs/standarddialogs/dialog.h
@@ -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
diff --git a/examples/dialogs/standarddialogs/main.cpp b/examples/dialogs/standarddialogs/main.cpp
index 2aec376dab..5dbf2cf910 100644
--- a/examples/dialogs/standarddialogs/main.cpp
+++ b/examples/dialogs/standarddialogs/main.cpp
@@ -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();
}
diff --git a/examples/dialogs/standarddialogs/standarddialogs.desktop b/examples/dialogs/standarddialogs/standarddialogs.desktop
new file mode 100644
index 0000000000..f74830317a
--- /dev/null
+++ b/examples/dialogs/standarddialogs/standarddialogs.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Standard Dialogs
+Exec=/opt/usr/bin/standarddialogs
+Icon=standarddialogs
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/standarddialogs/standarddialogs.pro b/examples/dialogs/standarddialogs/standarddialogs.pro
index 816cb0a0ed..46a692b15c 100644
--- a/examples/dialogs/standarddialogs/standarddialogs.pro
+++ b/examples/dialogs/standarddialogs/standarddialogs.pro
@@ -12,3 +12,4 @@ 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
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/dialogs/tabdialog/main.cpp b/examples/dialogs/tabdialog/main.cpp
index 87265c3986..6c83aa0b80 100644
--- a/examples/dialogs/tabdialog/main.cpp
+++ b/examples/dialogs/tabdialog/main.cpp
@@ -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();
}
diff --git a/examples/dialogs/tabdialog/tabdialog.cpp b/examples/dialogs/tabdialog/tabdialog.cpp
index 829d82e8c8..e38946a8ff 100644
--- a/examples/dialogs/tabdialog/tabdialog.cpp
+++ b/examples/dialogs/tabdialog/tabdialog.cpp
@@ -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);
diff --git a/examples/dialogs/tabdialog/tabdialog.desktop b/examples/dialogs/tabdialog/tabdialog.desktop
new file mode 100644
index 0000000000..651f7d4068
--- /dev/null
+++ b/examples/dialogs/tabdialog/tabdialog.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Tab Dialog
+Exec=/opt/usr/bin/tabdialog
+Icon=tabdialog
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/tabdialog/tabdialog.pro b/examples/dialogs/tabdialog/tabdialog.pro
index d011f04cc0..1e418f7f83 100644
--- a/examples/dialogs/tabdialog/tabdialog.pro
+++ b/examples/dialogs/tabdialog/tabdialog.pro
@@ -11,3 +11,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
QT += widgets
+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)
diff --git a/examples/dialogs/trivialwizard/trivialwizard.cpp b/examples/dialogs/trivialwizard/trivialwizard.cpp
index 5e3ef97694..df7d4e6559 100644
--- a/examples/dialogs/trivialwizard/trivialwizard.cpp
+++ b/examples/dialogs/trivialwizard/trivialwizard.cpp
@@ -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();
}
diff --git a/examples/dialogs/trivialwizard/trivialwizard.desktop b/examples/dialogs/trivialwizard/trivialwizard.desktop
new file mode 100644
index 0000000000..fad568ecc8
--- /dev/null
+++ b/examples/dialogs/trivialwizard/trivialwizard.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Trivial Wizard
+Exec=/opt/usr/bin/trivialwizard
+Icon=trivialwizard
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/dialogs/trivialwizard/trivialwizard.pro b/examples/dialogs/trivialwizard/trivialwizard.pro
index ec5c4f8605..b2a285e95a 100644
--- a/examples/dialogs/trivialwizard/trivialwizard.pro
+++ b/examples/dialogs/trivialwizard/trivialwizard.pro
@@ -8,3 +8,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/draganddrop/delayedencoding/delayedencoding.desktop b/examples/draganddrop/delayedencoding/delayedencoding.desktop
new file mode 100644
index 0000000000..629c497b6b
--- /dev/null
+++ b/examples/draganddrop/delayedencoding/delayedencoding.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Delayed Encoding
+Exec=/opt/usr/bin/delayedencoding
+Icon=delayedencoding
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/draganddrop/draggableicons/draggableicons.desktop b/examples/draganddrop/draggableicons/draggableicons.desktop
new file mode 100644
index 0000000000..d14f758ce6
--- /dev/null
+++ b/examples/draganddrop/draggableicons/draggableicons.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Draggable Icons
+Exec=/opt/usr/bin/draggableicons
+Icon=draggableicons
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/draganddrop/draggableicons/draggableicons.pro b/examples/draganddrop/draggableicons/draggableicons.pro
index 8285600c75..941e817462 100644
--- a/examples/draganddrop/draggableicons/draggableicons.pro
+++ b/examples/draganddrop/draggableicons/draggableicons.pro
@@ -14,3 +14,4 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/draganddrop/draggableicons/dragwidget.cpp b/examples/draganddrop/draggableicons/dragwidget.cpp
index 9e69bd5df8..e465e8ada5 100644
--- a/examples/draganddrop/draggableicons/dragwidget.cpp
+++ b/examples/draganddrop/draggableicons/dragwidget.cpp
@@ -46,25 +46,28 @@
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);
}
diff --git a/examples/draganddrop/draggableicons/main.cpp b/examples/draganddrop/draggableicons/main.cpp
index 7a80b92a8a..a6ade67651 100644
--- a/examples/draganddrop/draggableicons/main.cpp
+++ b/examples/draganddrop/draggableicons/main.cpp
@@ -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();
}
diff --git a/examples/draganddrop/draggabletext/draggabletext.desktop b/examples/draganddrop/draggabletext/draggabletext.desktop
new file mode 100644
index 0000000000..ceda807604
--- /dev/null
+++ b/examples/draganddrop/draggabletext/draggabletext.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Draggable Text
+Exec=/opt/usr/bin/draggabletext
+Icon=draggabletext
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/draganddrop/draggabletext/draggabletext.pro b/examples/draganddrop/draggabletext/draggabletext.pro
index 2d473500b0..cec6651629 100644
--- a/examples/draganddrop/draggabletext/draggabletext.pro
+++ b/examples/draganddrop/draggabletext/draggabletext.pro
@@ -16,3 +16,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/draganddrop/draggabletext/dragwidget.cpp b/examples/draganddrop/draggabletext/dragwidget.cpp
index 2ba4a1ac0f..5287c998a3 100644
--- a/examples/draganddrop/draggabletext/dragwidget.cpp
+++ b/examples/draganddrop/draggabletext/dragwidget.cpp
@@ -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));
diff --git a/examples/draganddrop/draggabletext/main.cpp b/examples/draganddrop/draggabletext/main.cpp
index 4d0a121337..0ae794b280 100644
--- a/examples/draganddrop/draggabletext/main.cpp
+++ b/examples/draganddrop/draggabletext/main.cpp
@@ -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();
}
diff --git a/examples/draganddrop/dropsite/dropsite.desktop b/examples/draganddrop/dropsite/dropsite.desktop
new file mode 100644
index 0000000000..70a192f2b1
--- /dev/null
+++ b/examples/draganddrop/dropsite/dropsite.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Drop Site
+Exec=/opt/usr/bin/dropsite
+Icon=dropsite
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/draganddrop/dropsite/dropsite.pro b/examples/draganddrop/dropsite/dropsite.pro
index 7f42258221..c725992f26 100644
--- a/examples/draganddrop/dropsite/dropsite.pro
+++ b/examples/draganddrop/dropsite/dropsite.pro
@@ -12,3 +12,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/draganddrop/fridgemagnets/dragwidget.cpp b/examples/draganddrop/fridgemagnets/dragwidget.cpp
index a2593a9b35..3dcd406174 100644
--- a/examples/draganddrop/fridgemagnets/dragwidget.cpp
+++ b/examples/draganddrop/fridgemagnets/dragwidget.cpp
@@ -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;
}
diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.desktop b/examples/draganddrop/fridgemagnets/fridgemagnets.desktop
new file mode 100644
index 0000000000..a240590c6b
--- /dev/null
+++ b/examples/draganddrop/fridgemagnets/fridgemagnets.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Fridge Magnets
+Exec=/opt/usr/bin/fridgemagnets
+Icon=fridgemagnets
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/draganddrop/fridgemagnets/fridgemagnets.pro b/examples/draganddrop/fridgemagnets/fridgemagnets.pro
index 8ecbc016dd..7cdb9591d6 100644
--- a/examples/draganddrop/fridgemagnets/fridgemagnets.pro
+++ b/examples/draganddrop/fridgemagnets/fridgemagnets.pro
@@ -18,3 +18,5 @@ symbian {
QT += widgets
+
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/draganddrop/fridgemagnets/main.cpp b/examples/draganddrop/fridgemagnets/main.cpp
index 1166abbcaa..623e6d2718 100644
--- a/examples/draganddrop/fridgemagnets/main.cpp
+++ b/examples/draganddrop/fridgemagnets/main.cpp
@@ -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();
}
diff --git a/examples/draganddrop/puzzle/main.cpp b/examples/draganddrop/puzzle/main.cpp
index 60341948ab..b432ddc40e 100644
--- a/examples/draganddrop/puzzle/main.cpp
+++ b/examples/draganddrop/puzzle/main.cpp
@@ -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();
}
diff --git a/examples/draganddrop/puzzle/mainwindow.cpp b/examples/draganddrop/puzzle/mainwindow.cpp
index 856df7004f..c00892a098 100644
--- a/examples/draganddrop/puzzle/mainwindow.cpp
+++ b/examples/draganddrop/puzzle/mainwindow.cpp
@@ -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);
diff --git a/examples/draganddrop/puzzle/pieceslist.cpp b/examples/draganddrop/puzzle/pieceslist.cpp
index f1a1e43e97..181cd56427 100644
--- a/examples/draganddrop/puzzle/pieceslist.cpp
+++ b/examples/draganddrop/puzzle/pieceslist.cpp
@@ -42,12 +42,12 @@
#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);
diff --git a/examples/draganddrop/puzzle/pieceslist.h b/examples/draganddrop/puzzle/pieceslist.h
index 2068dceb17..967ade0c73 100644
--- a/examples/draganddrop/puzzle/pieceslist.h
+++ b/examples/draganddrop/puzzle/pieceslist.h
@@ -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
diff --git a/examples/draganddrop/puzzle/puzzle.desktop b/examples/draganddrop/puzzle/puzzle.desktop
new file mode 100644
index 0000000000..f6765e1e01
--- /dev/null
+++ b/examples/draganddrop/puzzle/puzzle.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Drag and Drop Puzzle
+Exec=/opt/usr/bin/puzzle
+Icon=puzzle
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/draganddrop/puzzle/puzzle.pro b/examples/draganddrop/puzzle/puzzle.pro
index 20b6bbcb78..8c81c49b73 100644
--- a/examples/draganddrop/puzzle/puzzle.pro
+++ b/examples/draganddrop/puzzle/puzzle.pro
@@ -28,3 +28,4 @@ wince*: {
DEPLOYMENT += addFile
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/draganddrop/puzzle/puzzlewidget.cpp b/examples/draganddrop/puzzle/puzzlewidget.cpp
index 25a5fa5fb2..cee2596a61 100644
--- a/examples/draganddrop/puzzle/puzzlewidget.cpp
+++ b/examples/draganddrop/puzzle/puzzlewidget.cpp
@@ -42,12 +42,12 @@
#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;
}
diff --git a/examples/draganddrop/puzzle/puzzlewidget.h b/examples/draganddrop/puzzle/puzzlewidget.h
index e0356b48fd..2cc789c292 100644
--- a/examples/draganddrop/puzzle/puzzlewidget.h
+++ b/examples/draganddrop/puzzle/puzzlewidget.h
@@ -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
diff --git a/examples/effects/blurpicker/blurpicker.cpp b/examples/effects/blurpicker/blurpicker.cpp
index 8739301a59..5883c741be 100644
--- a/examples/effects/blurpicker/blurpicker.cpp
+++ b/examples/effects/blurpicker/blurpicker.cpp
@@ -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();
}
}
diff --git a/examples/effects/blurpicker/blurpicker.desktop b/examples/effects/blurpicker/blurpicker.desktop
new file mode 100644
index 0000000000..0863ef7ba8
--- /dev/null
+++ b/examples/effects/blurpicker/blurpicker.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Blur Picker Effect
+Exec=/opt/usr/bin/blurpicker
+Icon=blurpicker
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/effects/blurpicker/blurpicker.h b/examples/effects/blurpicker/blurpicker.h
index fa5743c70a..af367b96c2 100644
--- a/examples/effects/blurpicker/blurpicker.h
+++ b/examples/effects/blurpicker/blurpicker.h
@@ -60,6 +60,8 @@ public:
protected:
void keyPressEvent(QKeyEvent *event);
+ void resizeEvent(QResizeEvent *event);
+ void mousePressEvent(QMouseEvent *event);
private:
void setupScene();
diff --git a/examples/effects/blurpicker/blurpicker.pro b/examples/effects/blurpicker/blurpicker.pro
index bb0b9b9273..e24e6cbada 100644
--- a/examples/effects/blurpicker/blurpicker.pro
+++ b/examples/effects/blurpicker/blurpicker.pro
@@ -8,3 +8,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS blurpicker.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/blurpicker
INSTALLS += target sources
QT += widgets
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/effects/blurpicker/main.cpp b/examples/effects/blurpicker/main.cpp
index e95b7e0239..5138fccfcf 100644
--- a/examples/effects/blurpicker/main.cpp
+++ b/examples/effects/blurpicker/main.cpp
@@ -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();
}
diff --git a/examples/effects/fademessage/fademessage.cpp b/examples/effects/fademessage/fademessage.cpp
index 6113c7978e..b6e94e5e2e 100644
--- a/examples/effects/fademessage/fademessage.cpp
+++ b/examples/effects/fademessage/fademessage.cpp
@@ -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
}
-
diff --git a/examples/effects/fademessage/fademessage.desktop b/examples/effects/fademessage/fademessage.desktop
new file mode 100644
index 0000000000..aa22ad7912
--- /dev/null
+++ b/examples/effects/fademessage/fademessage.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Fade Message Effect
+Exec=/opt/usr/bin/fademessage
+Icon=fademessage
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/effects/fademessage/fademessage.pro b/examples/effects/fademessage/fademessage.pro
index 8a9de817dc..5f24357dee 100644
--- a/examples/effects/fademessage/fademessage.pro
+++ b/examples/effects/fademessage/fademessage.pro
@@ -12,6 +12,8 @@ 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)
QT += widgets
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/effects/fademessage/main.cpp b/examples/effects/fademessage/main.cpp
index 83d6d8eab8..8c72a458b0 100644
--- a/examples/effects/fademessage/main.cpp
+++ b/examples/effects/fademessage/main.cpp
@@ -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();
}
diff --git a/examples/effects/lighting/lighting.cpp b/examples/effects/lighting/lighting.cpp
index 6b0185737c..4532fafe25 100644
--- a/examples/effects/lighting/lighting.cpp
+++ b/examples/effects/lighting/lighting.cpp
@@ -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
+}
diff --git a/examples/effects/lighting/lighting.desktop b/examples/effects/lighting/lighting.desktop
new file mode 100644
index 0000000000..806b3deca0
--- /dev/null
+++ b/examples/effects/lighting/lighting.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Lighting Effect
+Exec=/opt/usr/bin/lighting
+Icon=lighting
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/effects/lighting/lighting.h b/examples/effects/lighting/lighting.h
index 6a6bc56582..5099653b71 100644
--- a/examples/effects/lighting/lighting.h
+++ b/examples/effects/lighting/lighting.h
@@ -57,6 +57,9 @@ private slots:
private:
void setupScene();
+protected:
+ void resizeEvent(QResizeEvent *event);
+
private:
qreal angle;
QGraphicsScene m_scene;
diff --git a/examples/effects/lighting/lighting.pro b/examples/effects/lighting/lighting.pro
index 2d0462867b..8c7af8f660 100644
--- a/examples/effects/lighting/lighting.pro
+++ b/examples/effects/lighting/lighting.pro
@@ -7,3 +7,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS lighting.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/effects/lighting
INSTALLS += target sources
QT += widgets
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/effects/lighting/main.cpp b/examples/effects/lighting/main.cpp
index c75d84159f..fff3d73f2a 100644
--- a/examples/effects/lighting/main.cpp
+++ b/examples/effects/lighting/main.cpp
@@ -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();
}
diff --git a/examples/examples.pro b/examples/examples.pro
index 1cce476806..b10ff590b0 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -66,3 +66,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/gestures/imagegestures/imagegestures.desktop b/examples/gestures/imagegestures/imagegestures.desktop
new file mode 100644
index 0000000000..06068ff78d
--- /dev/null
+++ b/examples/gestures/imagegestures/imagegestures.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Image Gestures
+Exec=/opt/usr/bin/imagegestures
+Icon=imagegestures
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/gestures/imagegestures/imagegestures.pro b/examples/gestures/imagegestures/imagegestures.pro
index cd1f177718..c36ad25831 100644
--- a/examples/gestures/imagegestures/imagegestures.pro
+++ b/examples/gestures/imagegestures/imagegestures.pro
@@ -20,3 +20,7 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/graphicsview/anchorlayout/anchorlayout.desktop b/examples/graphicsview/anchorlayout/anchorlayout.desktop
new file mode 100644
index 0000000000..6cf53c3f9b
--- /dev/null
+++ b/examples/graphicsview/anchorlayout/anchorlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Anchor Layout
+Exec=/opt/usr/bin/anchorlayout
+Icon=anchorlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/anchorlayout/anchorlayout.pro b/examples/graphicsview/anchorlayout/anchorlayout.pro
index 8791a16abc..32066e3502 100644
--- a/examples/graphicsview/anchorlayout/anchorlayout.pro
+++ b/examples/graphicsview/anchorlayout/anchorlayout.pro
@@ -8,3 +8,8 @@ INSTALLS += target sources
TARGET = anchorlayout
QT += widgets
+
+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)
diff --git a/examples/graphicsview/anchorlayout/main.cpp b/examples/graphicsview/anchorlayout/main.cpp
index e8cf1adf4e..f9f93fb961 100644
--- a/examples/graphicsview/anchorlayout/main.cpp
+++ b/examples/graphicsview/anchorlayout/main.cpp
@@ -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();
}
diff --git a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.desktop b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.desktop
new file mode 100644
index 0000000000..be1c3e4a84
--- /dev/null
+++ b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Basic Graphics Layouts
+Exec=/opt/usr/bin/basicgraphicslayouts
+Icon=basicgraphicslayouts
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
index 524623e840..900d6d138e 100644
--- a/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
+++ b/examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro
@@ -16,3 +16,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/basicgraphicslayouts/main.cpp b/examples/graphicsview/basicgraphicslayouts/main.cpp
index 5edd130403..4a9e8f91b4 100644
--- a/examples/graphicsview/basicgraphicslayouts/main.cpp
+++ b/examples/graphicsview/basicgraphicslayouts/main.cpp
@@ -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();
}
diff --git a/examples/graphicsview/collidingmice/collidingmice.desktop b/examples/graphicsview/collidingmice/collidingmice.desktop
new file mode 100644
index 0000000000..f0064e7112
--- /dev/null
+++ b/examples/graphicsview/collidingmice/collidingmice.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Colliding Mice
+Exec=/opt/usr/bin/collidingmice
+Icon=collidingmice
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/collidingmice/collidingmice.pro b/examples/graphicsview/collidingmice/collidingmice.pro
index 1b94671226..7a1ecc34ed 100644
--- a/examples/graphicsview/collidingmice/collidingmice.pro
+++ b/examples/graphicsview/collidingmice/collidingmice.pro
@@ -18,3 +18,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/collidingmice/main.cpp b/examples/graphicsview/collidingmice/main.cpp
index 5bba2756ce..561887995e 100644
--- a/examples/graphicsview/collidingmice/main.cpp
+++ b/examples/graphicsview/collidingmice/main.cpp
@@ -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()));
diff --git a/examples/graphicsview/diagramscene/diagramscene.desktop b/examples/graphicsview/diagramscene/diagramscene.desktop
new file mode 100644
index 0000000000..54506ff979
--- /dev/null
+++ b/examples/graphicsview/diagramscene/diagramscene.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Diagram Scene
+Exec=/opt/usr/bin/diagramscene
+Icon=diagramscene
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/diagramscene/diagramscene.pro b/examples/graphicsview/diagramscene/diagramscene.pro
index c2b971abb9..99cd4dea78 100644
--- a/examples/graphicsview/diagramscene/diagramscene.pro
+++ b/examples/graphicsview/diagramscene/diagramscene.pro
@@ -19,5 +19,9 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/diagramscene
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/graphicsview/dragdroprobot/dragdroprobot.desktop b/examples/graphicsview/dragdroprobot/dragdroprobot.desktop
new file mode 100644
index 0000000000..c01e3a3425
--- /dev/null
+++ b/examples/graphicsview/dragdroprobot/dragdroprobot.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Drag and Drop Robot
+Exec=/opt/usr/bin/dragdroprobot
+Icon=dragdroprobot
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/dragdroprobot/dragdroprobot.pro b/examples/graphicsview/dragdroprobot/dragdroprobot.pro
index 579e45d26d..db5d94a600 100644
--- a/examples/graphicsview/dragdroprobot/dragdroprobot.pro
+++ b/examples/graphicsview/dragdroprobot/dragdroprobot.pro
@@ -19,3 +19,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp
index 8c2acc499a..001b81e0b7 100644
--- a/examples/graphicsview/dragdroprobot/main.cpp
+++ b/examples/graphicsview/dragdroprobot/main.cpp
@@ -45,6 +45,22 @@
#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();
}
diff --git a/examples/graphicsview/elasticnodes/edge.cpp b/examples/graphicsview/elasticnodes/edge.cpp
index 2b5cae5e1b..652ab737fc 100644
--- a/examples/graphicsview/elasticnodes/edge.cpp
+++ b/examples/graphicsview/elasticnodes/edge.cpp
@@ -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]
diff --git a/examples/graphicsview/elasticnodes/elasticnodes.desktop b/examples/graphicsview/elasticnodes/elasticnodes.desktop
new file mode 100644
index 0000000000..64402d080f
--- /dev/null
+++ b/examples/graphicsview/elasticnodes/elasticnodes.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Elastic Nodes
+Exec=/opt/usr/bin/elasticnodes
+Icon=elasticnodes
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/elasticnodes/elasticnodes.pro b/examples/graphicsview/elasticnodes/elasticnodes.pro
index be7ebe460b..6017b2c9d4 100644
--- a/examples/graphicsview/elasticnodes/elasticnodes.pro
+++ b/examples/graphicsview/elasticnodes/elasticnodes.pro
@@ -22,3 +22,6 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/graphicsview/elasticnodes/graphwidget.cpp b/examples/graphicsview/elasticnodes/graphwidget.cpp
index ce73a68b47..48a9784c54 100644
--- a/examples/graphicsview/elasticnodes/graphwidget.cpp
+++ b/examples/graphicsview/elasticnodes/graphwidget.cpp
@@ -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));
+}
diff --git a/examples/graphicsview/elasticnodes/graphwidget.h b/examples/graphicsview/elasticnodes/graphwidget.h
index f64f59e691..354967bdd2 100644
--- a/examples/graphicsview/elasticnodes/graphwidget.h
+++ b/examples/graphicsview/elasticnodes/graphwidget.h
@@ -55,6 +55,11 @@ public:
void itemMoved();
+public slots:
+ void shuffle();
+ void zoomIn();
+ void zoomOut();
+
protected:
void keyPressEvent(QKeyEvent *event);
void timerEvent(QTimerEvent *event);
diff --git a/examples/graphicsview/elasticnodes/main.cpp b/examples/graphicsview/elasticnodes/main.cpp
index 2cd3d2641f..9eb8ba11be 100644
--- a/examples/graphicsview/elasticnodes/main.cpp
+++ b/examples/graphicsview/elasticnodes/main.cpp
@@ -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();
}
diff --git a/examples/graphicsview/elasticnodes/node.cpp b/examples/graphicsview/elasticnodes/node.cpp
index 8d1daddc12..b345f83640 100644
--- a/examples/graphicsview/elasticnodes/node.cpp
+++ b/examples/graphicsview/elasticnodes/node.cpp
@@ -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);
}
diff --git a/examples/graphicsview/flowlayout/flowlayout.desktop b/examples/graphicsview/flowlayout/flowlayout.desktop
new file mode 100644
index 0000000000..54ea3b0290
--- /dev/null
+++ b/examples/graphicsview/flowlayout/flowlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Flow Layout
+Exec=/opt/usr/bin/flowlayout
+Icon=flowlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/flowlayout/flowlayout.pro b/examples/graphicsview/flowlayout/flowlayout.pro
index 22ac005715..4f54ed2b05 100644
--- a/examples/graphicsview/flowlayout/flowlayout.pro
+++ b/examples/graphicsview/flowlayout/flowlayout.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
@@ -9,3 +8,7 @@ QMAKE_PROJECT_NAME = flowlayout_graphicsview
HEADERS += flowlayout.h window.h
SOURCES += flowlayout.cpp main.cpp window.cpp
QT += widgets
+
+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)
diff --git a/examples/graphicsview/flowlayout/main.cpp b/examples/graphicsview/flowlayout/main.cpp
index e8b72b179f..8f5a0faede 100644
--- a/examples/graphicsview/flowlayout/main.cpp
+++ b/examples/graphicsview/flowlayout/main.cpp
@@ -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();
}
diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro
index 53ad3d67a2..83dfe728c2 100644
--- a/examples/graphicsview/graphicsview.pro
+++ b/examples/graphicsview/graphicsview.pro
@@ -23,3 +23,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/graphicsview/padnavigator/main.cpp b/examples/graphicsview/padnavigator/main.cpp
index 5552ba511b..9a397c783a 100644
--- a/examples/graphicsview/padnavigator/main.cpp
+++ b/examples/graphicsview/padnavigator/main.cpp
@@ -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]
diff --git a/examples/graphicsview/padnavigator/padnavigator.desktop b/examples/graphicsview/padnavigator/padnavigator.desktop
new file mode 100644
index 0000000000..f0490730c6
--- /dev/null
+++ b/examples/graphicsview/padnavigator/padnavigator.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Pad Navigator
+Exec=/opt/usr/bin/padnavigator
+Icon=padnavigator
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/padnavigator/padnavigator.pro b/examples/graphicsview/padnavigator/padnavigator.pro
index 28c636fc74..9a1229ece2 100644
--- a/examples/graphicsview/padnavigator/padnavigator.pro
+++ b/examples/graphicsview/padnavigator/padnavigator.pro
@@ -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)
diff --git a/examples/graphicsview/portedasteroids/portedasteroids.desktop b/examples/graphicsview/portedasteroids/portedasteroids.desktop
new file mode 100644
index 0000000000..abd061699b
--- /dev/null
+++ b/examples/graphicsview/portedasteroids/portedasteroids.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Ported Asteroids
+Exec=/opt/usr/bin/portedasteroids
+Icon=portedasteroids
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/portedcanvas/portedcanvas.desktop b/examples/graphicsview/portedcanvas/portedcanvas.desktop
new file mode 100644
index 0000000000..1217dc43de
--- /dev/null
+++ b/examples/graphicsview/portedcanvas/portedcanvas.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Ported Canvas
+Exec=/opt/usr/bin/portedcanvas
+Icon=portedcanvas
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/simpleanchorlayout/main.cpp b/examples/graphicsview/simpleanchorlayout/main.cpp
index fe5786fa7a..ff1ac2ba59 100644
--- a/examples/graphicsview/simpleanchorlayout/main.cpp
+++ b/examples/graphicsview/simpleanchorlayout/main.cpp
@@ -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();
}
diff --git a/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.desktop b/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.desktop
new file mode 100644
index 0000000000..0e8d73a859
--- /dev/null
+++ b/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Simple Anchor Layout
+Exec=/opt/usr/bin/simpleanchorlayout
+Icon=simpleanchorlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro b/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
index adb4c02b42..a4302eb9cc 100644
--- a/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
+++ b/examples/graphicsview/simpleanchorlayout/simpleanchorlayout.pro
@@ -8,3 +8,7 @@ INSTALLS += target sources
TARGET = simpleanchorlayout
QT += widgets
+
+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)
diff --git a/examples/graphicsview/weatheranchorlayout/main.cpp b/examples/graphicsview/weatheranchorlayout/main.cpp
index 67596ac4bc..b1f2c724a1 100644
--- a/examples/graphicsview/weatheranchorlayout/main.cpp
+++ b/examples/graphicsview/weatheranchorlayout/main.cpp
@@ -51,6 +51,21 @@
#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();
}
diff --git a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.desktop b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.desktop
new file mode 100644
index 0000000000..0c6ab89a68
--- /dev/null
+++ b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Weather Anchor Layout
+Exec=/opt/usr/bin/weatheranchorlayout
+Icon=weatheranchorlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
index 444346d310..b545ff0743 100644
--- a/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
+++ b/examples/graphicsview/weatheranchorlayout/weatheranchorlayout.pro
@@ -13,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/weatheranchorlayout
INSTALLS += target sources
QT += widgets
+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)
diff --git a/examples/ipc/ipc.pro b/examples/ipc/ipc.pro
index ba004bb03a..3c07ce9af8 100644
--- a/examples/ipc/ipc.pro
+++ b/examples/ipc/ipc.pro
@@ -10,3 +10,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/ipc/localfortuneclient/client.cpp b/examples/ipc/localfortuneclient/client.cpp
index d6249849d8..2884fac7a7 100644
--- a/examples/ipc/localfortuneclient/client.cpp
+++ b/examples/ipc/localfortuneclient/client.cpp
@@ -44,7 +44,11 @@
#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);
diff --git a/examples/ipc/localfortuneclient/client.h b/examples/ipc/localfortuneclient/client.h
index d23db9e6e2..b0f0e36189 100644
--- a/examples/ipc/localfortuneclient/client.h
+++ b/examples/ipc/localfortuneclient/client.h
@@ -41,7 +41,12 @@
#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
diff --git a/examples/ipc/localfortuneclient/localfortuneclient.desktop b/examples/ipc/localfortuneclient/localfortuneclient.desktop
new file mode 100644
index 0000000000..556ff4795d
--- /dev/null
+++ b/examples/ipc/localfortuneclient/localfortuneclient.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Local Fortune Client
+Exec=/opt/usr/bin/localfortuneclient
+Icon=localfortuneclient
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/ipc/localfortuneclient/localfortuneclient.pro b/examples/ipc/localfortuneclient/localfortuneclient.pro
index 73fac17569..d1f87b684a 100644
--- a/examples/ipc/localfortuneclient/localfortuneclient.pro
+++ b/examples/ipc/localfortuneclient/localfortuneclient.pro
@@ -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)
diff --git a/examples/ipc/localfortuneclient/main.cpp b/examples/ipc/localfortuneclient/main.cpp
index 19464d1de3..8e6feeba72 100644
--- a/examples/ipc/localfortuneclient/main.cpp
+++ b/examples/ipc/localfortuneclient/main.cpp
@@ -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();
}
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.desktop b/examples/ipc/localfortuneserver/localfortuneserver.desktop
new file mode 100644
index 0000000000..74f485049a
--- /dev/null
+++ b/examples/ipc/localfortuneserver/localfortuneserver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Local Fortune Server
+Exec=/opt/usr/bin/localfortuneserver
+Icon=localfortuneserver
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/ipc/localfortuneserver/localfortuneserver.pro b/examples/ipc/localfortuneserver/localfortuneserver.pro
index eb51371ae5..4c55f3b11d 100644
--- a/examples/ipc/localfortuneserver/localfortuneserver.pro
+++ b/examples/ipc/localfortuneserver/localfortuneserver.pro
@@ -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)
diff --git a/examples/ipc/localfortuneserver/main.cpp b/examples/ipc/localfortuneserver/main.cpp
index 6c0e9ee9f3..fc0c698156 100644
--- a/examples/ipc/localfortuneserver/main.cpp
+++ b/examples/ipc/localfortuneserver/main.cpp
@@ -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();
}
diff --git a/examples/ipc/localfortuneserver/server.cpp b/examples/ipc/localfortuneserver/server.cpp
index 493f4d269b..e68e5de457 100644
--- a/examples/ipc/localfortuneserver/server.cpp
+++ b/examples/ipc/localfortuneserver/server.cpp
@@ -48,9 +48,14 @@
#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);
diff --git a/examples/ipc/localfortuneserver/server.h b/examples/ipc/localfortuneserver/server.h
index 5f00ba4d2d..313862cfaa 100644
--- a/examples/ipc/localfortuneserver/server.h
+++ b/examples/ipc/localfortuneserver/server.h
@@ -41,7 +41,11 @@
#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
diff --git a/examples/ipc/sharedmemory/sharedmemory.desktop b/examples/ipc/sharedmemory/sharedmemory.desktop
new file mode 100644
index 0000000000..118ded97cd
--- /dev/null
+++ b/examples/ipc/sharedmemory/sharedmemory.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Shared Memory
+Exec=/opt/usr/bin/sharedmemory
+Icon=sharedmemory
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/ipc/sharedmemory/sharedmemory.pro b/examples/ipc/sharedmemory/sharedmemory.pro
index f448d98a21..7c5b5dcd29 100644
--- a/examples/ipc/sharedmemory/sharedmemory.pro
+++ b/examples/ipc/sharedmemory/sharedmemory.pro
@@ -14,3 +14,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/itemviews/addressbook/addressbook.desktop b/examples/itemviews/addressbook/addressbook.desktop
new file mode 100644
index 0000000000..11767f59d8
--- /dev/null
+++ b/examples/itemviews/addressbook/addressbook.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Address Book
+Exec=/opt/usr/bin/addressbook
+Icon=addressbook
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/addressbook/addressbook.pro b/examples/itemviews/addressbook/addressbook.pro
index 5754c47d30..4f83a5ef79 100644
--- a/examples/itemviews/addressbook/addressbook.pro
+++ b/examples/itemviews/addressbook/addressbook.pro
@@ -21,3 +21,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/itemviews/addressbook/main.cpp b/examples/itemviews/addressbook/main.cpp
index 0a0ccb7ac8..2c01aec78b 100644
--- a/examples/itemviews/addressbook/main.cpp
+++ b/examples/itemviews/addressbook/main.cpp
@@ -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]
diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop
new file mode 100644
index 0000000000..22621f3ba5
--- /dev/null
+++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Basic Sort Filter Model
+Exec=/opt/usr/bin/basicsortfiltermodel
+Icon=basicsortfiltermodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
index e4f0481e0e..a317f44282 100644
--- a/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
+++ b/examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro
@@ -11,3 +11,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/basicsortfiltermodel/main.cpp b/examples/itemviews/basicsortfiltermodel/main.cpp
index 8f8a2a7205..003f6a45f8 100644
--- a/examples/itemviews/basicsortfiltermodel/main.cpp
+++ b/examples/itemviews/basicsortfiltermodel/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/basicsortfiltermodel/window.cpp b/examples/itemviews/basicsortfiltermodel/window.cpp
index da3da56829..9fcd363002 100644
--- a/examples/itemviews/basicsortfiltermodel/window.cpp
+++ b/examples/itemviews/basicsortfiltermodel/window.cpp
@@ -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"));
diff --git a/examples/itemviews/basicsortfiltermodel/window.h b/examples/itemviews/basicsortfiltermodel/window.h
index 92b5008384..fbdffc3abb 100644
--- a/examples/itemviews/basicsortfiltermodel/window.h
+++ b/examples/itemviews/basicsortfiltermodel/window.h
@@ -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;
diff --git a/examples/itemviews/chart/chart.desktop b/examples/itemviews/chart/chart.desktop
new file mode 100644
index 0000000000..73e017baeb
--- /dev/null
+++ b/examples/itemviews/chart/chart.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Chart
+Exec=/opt/usr/bin/chart
+Icon=chart
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/chart/chart.pro b/examples/itemviews/chart/chart.pro
index 81f1f5509a..70100f89be 100644
--- a/examples/itemviews/chart/chart.pro
+++ b/examples/itemviews/chart/chart.pro
@@ -19,3 +19,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/itemviews/chart/main.cpp b/examples/itemviews/chart/main.cpp
index 936654097f..52d8f281c3 100644
--- a/examples/itemviews/chart/main.cpp
+++ b/examples/itemviews/chart/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.desktop b/examples/itemviews/coloreditorfactory/coloreditorfactory.desktop
new file mode 100644
index 0000000000..70b966445c
--- /dev/null
+++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Color Editor Factory
+Exec=/opt/usr/bin/coloreditorfactory
+Icon=coloreditorfactory
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
index ab4503bbad..387efd59aa 100644
--- a/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
+++ b/examples/itemviews/coloreditorfactory/coloreditorfactory.pro
@@ -12,3 +12,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/itemviews/coloreditorfactory/main.cpp b/examples/itemviews/coloreditorfactory/main.cpp
index bbb1d25933..7690ba9c1d 100644
--- a/examples/itemviews/coloreditorfactory/main.cpp
+++ b/examples/itemviews/coloreditorfactory/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/combowidgetmapper/combowidgetmapper.desktop b/examples/itemviews/combowidgetmapper/combowidgetmapper.desktop
new file mode 100644
index 0000000000..3bbf6ad5f3
--- /dev/null
+++ b/examples/itemviews/combowidgetmapper/combowidgetmapper.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Combo Widget Mapper
+Exec=/opt/usr/bin/combowidgetmapper
+Icon=combowidgetmapper
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
index a3ecc3d691..d538fe58f0 100644
--- a/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
+++ b/examples/itemviews/combowidgetmapper/combowidgetmapper.pro
@@ -8,3 +8,6 @@ sources.files = $$SOURCES $$HEADERS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/combowidgetmapper
INSTALLS += target sources
QT += widgets
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/itemviews/combowidgetmapper/main.cpp b/examples/itemviews/combowidgetmapper/main.cpp
index 41e756d8ad..9e45edefac 100644
--- a/examples/itemviews/combowidgetmapper/main.cpp
+++ b/examples/itemviews/combowidgetmapper/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop
new file mode 100644
index 0000000000..3c961f7e65
--- /dev/null
+++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Custom Sort Filter Model
+Exec=/opt/usr/bin/customsortfiltermodel
+Icon=customsortfiltermodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
index cfa1af1801..05087f9dda 100644
--- a/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
+++ b/examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro
@@ -13,3 +13,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/customsortfiltermodel/main.cpp b/examples/itemviews/customsortfiltermodel/main.cpp
index 34be2f682b..e643062ac0 100644
--- a/examples/itemviews/customsortfiltermodel/main.cpp
+++ b/examples/itemviews/customsortfiltermodel/main.cpp
@@ -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]
diff --git a/examples/itemviews/customsortfiltermodel/window.cpp b/examples/itemviews/customsortfiltermodel/window.cpp
index 1228d7565d..323eef98ce 100644
--- a/examples/itemviews/customsortfiltermodel/window.cpp
+++ b/examples/itemviews/customsortfiltermodel/window.cpp
@@ -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);
diff --git a/examples/itemviews/customsortfiltermodel/window.h b/examples/itemviews/customsortfiltermodel/window.h
index 15baffc2c6..50ec1f413c 100644
--- a/examples/itemviews/customsortfiltermodel/window.h
+++ b/examples/itemviews/customsortfiltermodel/window.h
@@ -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;
diff --git a/examples/itemviews/dirview/dirview.desktop b/examples/itemviews/dirview/dirview.desktop
new file mode 100644
index 0000000000..51ec4df26c
--- /dev/null
+++ b/examples/itemviews/dirview/dirview.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Dir View
+Exec=/opt/usr/bin/dirview
+Icon=dirview
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/dirview/dirview.pro b/examples/itemviews/dirview/dirview.pro
index cd5ea0afb9..2401ee91dc 100644
--- a/examples/itemviews/dirview/dirview.pro
+++ b/examples/itemviews/dirview/dirview.pro
@@ -8,3 +8,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/dirview/main.cpp b/examples/itemviews/dirview/main.cpp
index dbb5b7ae8c..c15040902c 100644
--- a/examples/itemviews/dirview/main.cpp
+++ b/examples/itemviews/dirview/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.desktop b/examples/itemviews/editabletreemodel/editabletreemodel.desktop
new file mode 100644
index 0000000000..17d17330df
--- /dev/null
+++ b/examples/itemviews/editabletreemodel/editabletreemodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Editable Tree Model
+Exec=/opt/usr/bin/editabletreemodel
+Icon=editabletreemodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/editabletreemodel/editabletreemodel.pro b/examples/itemviews/editabletreemodel/editabletreemodel.pro
index 4797f19c6e..e844994896 100644
--- a/examples/itemviews/editabletreemodel/editabletreemodel.pro
+++ b/examples/itemviews/editabletreemodel/editabletreemodel.pro
@@ -17,3 +17,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/editabletreemodel/main.cpp b/examples/itemviews/editabletreemodel/main.cpp
index 5a2cc77465..c499bb7454 100644
--- a/examples/itemviews/editabletreemodel/main.cpp
+++ b/examples/itemviews/editabletreemodel/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/editabletreemodel/mainwindow.cpp b/examples/itemviews/editabletreemodel/mainwindow.cpp
index 380796d96a..a6a294e71c 100644
--- a/examples/itemviews/editabletreemodel/mainwindow.cpp
+++ b/examples/itemviews/editabletreemodel/mainwindow.cpp
@@ -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");
diff --git a/examples/itemviews/fetchmore/fetchmore.desktop b/examples/itemviews/fetchmore/fetchmore.desktop
new file mode 100644
index 0000000000..b8c9ff32cb
--- /dev/null
+++ b/examples/itemviews/fetchmore/fetchmore.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Fetch More
+Exec=/opt/usr/bin/fetchmore
+Icon=fetchmore
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/fetchmore/fetchmore.pro b/examples/itemviews/fetchmore/fetchmore.pro
index 28af7e9ac0..9f81d00670 100644
--- a/examples/itemviews/fetchmore/fetchmore.pro
+++ b/examples/itemviews/fetchmore/fetchmore.pro
@@ -11,3 +11,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/fetchmore
INSTALLS += target sources
QT += widgets
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/itemviews/fetchmore/main.cpp b/examples/itemviews/fetchmore/main.cpp
index aedfd9f8d3..c2deca3ff1 100644
--- a/examples/itemviews/fetchmore/main.cpp
+++ b/examples/itemviews/fetchmore/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/frozencolumn/frozencolumn.desktop b/examples/itemviews/frozencolumn/frozencolumn.desktop
new file mode 100644
index 0000000000..3d1e3b430d
--- /dev/null
+++ b/examples/itemviews/frozencolumn/frozencolumn.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Frozen Column
+Exec=/opt/usr/bin/frozencolumn
+Icon=frozencolumn
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/frozencolumn/frozencolumn.pro b/examples/itemviews/frozencolumn/frozencolumn.pro
index 19b2880a83..684f4bb21b 100644
--- a/examples/itemviews/frozencolumn/frozencolumn.pro
+++ b/examples/itemviews/frozencolumn/frozencolumn.pro
@@ -8,3 +8,6 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/frozencolumn
INSTALLS += target sources
QT += widgets
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/itemviews/frozencolumn/main.cpp b/examples/itemviews/frozencolumn/main.cpp
index f6aa489d05..79f8ad4abe 100644
--- a/examples/itemviews/frozencolumn/main.cpp
+++ b/examples/itemviews/frozencolumn/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/itemviews.pro b/examples/itemviews/itemviews.pro
index 1db97e2c02..d82e1ee0c0 100644
--- a/examples/itemviews/itemviews.pro
+++ b/examples/itemviews/itemviews.pro
@@ -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
@@ -28,3 +22,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/pixelator/main.cpp b/examples/itemviews/pixelator/main.cpp
index e7f45e3f42..0324b3a3b2 100644
--- a/examples/itemviews/pixelator/main.cpp
+++ b/examples/itemviews/pixelator/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/pixelator/pixelator.desktop b/examples/itemviews/pixelator/pixelator.desktop
new file mode 100644
index 0000000000..751deb13b3
--- /dev/null
+++ b/examples/itemviews/pixelator/pixelator.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Pixelator
+Exec=/opt/usr/bin/pixelator
+Icon=pixelator
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/pixelator/pixelator.pro b/examples/itemviews/pixelator/pixelator.pro
index 6704374e57..57450fe992 100644
--- a/examples/itemviews/pixelator/pixelator.pro
+++ b/examples/itemviews/pixelator/pixelator.pro
@@ -15,3 +15,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/pixelator/pixeldelegate.cpp b/examples/itemviews/pixelator/pixeldelegate.cpp
index 2ba4722ff4..2260553cbb 100644
--- a/examples/itemviews/pixelator/pixeldelegate.cpp
+++ b/examples/itemviews/pixelator/pixeldelegate.cpp
@@ -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]
diff --git a/examples/itemviews/puzzle/main.cpp b/examples/itemviews/puzzle/main.cpp
index 60341948ab..bdba2874f3 100644
--- a/examples/itemviews/puzzle/main.cpp
+++ b/examples/itemviews/puzzle/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/puzzle/mainwindow.cpp b/examples/itemviews/puzzle/mainwindow.cpp
index c72fe2b08b..9787512cb4 100644
--- a/examples/itemviews/puzzle/mainwindow.cpp
+++ b/examples/itemviews/puzzle/mainwindow.cpp
@@ -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);
diff --git a/examples/itemviews/puzzle/piecesmodel.cpp b/examples/itemviews/puzzle/piecesmodel.cpp
index 6c95a86c56..4c53648210 100644
--- a/examples/itemviews/puzzle/piecesmodel.cpp
+++ b/examples/itemviews/puzzle/piecesmodel.cpp
@@ -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));
}
}
diff --git a/examples/itemviews/puzzle/piecesmodel.h b/examples/itemviews/puzzle/piecesmodel.h
index 30bbdf83b2..40079fe1c1 100644
--- a/examples/itemviews/puzzle/piecesmodel.h
+++ b/examples/itemviews/puzzle/piecesmodel.h
@@ -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
diff --git a/examples/itemviews/puzzle/puzzle.desktop b/examples/itemviews/puzzle/puzzle.desktop
new file mode 100644
index 0000000000..d493e7dd41
--- /dev/null
+++ b/examples/itemviews/puzzle/puzzle.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Item Views Puzzle
+Exec=/opt/usr/bin/puzzle
+Icon=puzzle
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/puzzle/puzzle.pro b/examples/itemviews/puzzle/puzzle.pro
index f45bbb70d3..8e133d7b7b 100644
--- a/examples/itemviews/puzzle/puzzle.pro
+++ b/examples/itemviews/puzzle/puzzle.pro
@@ -20,3 +20,5 @@ wince* {
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/itemviews/puzzle/puzzlewidget.cpp b/examples/itemviews/puzzle/puzzlewidget.cpp
index 1b78a1ba63..604c73d8f0 100644
--- a/examples/itemviews/puzzle/puzzlewidget.cpp
+++ b/examples/itemviews/puzzle/puzzlewidget.cpp
@@ -42,12 +42,12 @@
#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;
}
diff --git a/examples/itemviews/puzzle/puzzlewidget.h b/examples/itemviews/puzzle/puzzlewidget.h
index e0356b48fd..2cc789c292 100644
--- a/examples/itemviews/puzzle/puzzlewidget.h
+++ b/examples/itemviews/puzzle/puzzlewidget.h
@@ -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
diff --git a/examples/itemviews/simpledommodel/main.cpp b/examples/itemviews/simpledommodel/main.cpp
index 74a14b0f8c..94496f88bb 100644
--- a/examples/itemviews/simpledommodel/main.cpp
+++ b/examples/itemviews/simpledommodel/main.cpp
@@ -46,7 +46,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow window;
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#elif defined(Q_WS_MAEMO_5)
+ window.show();
+#else
window.resize(640, 480);
window.show();
+#endif
return app.exec();
}
diff --git a/examples/itemviews/simpledommodel/simpledommodel.desktop b/examples/itemviews/simpledommodel/simpledommodel.desktop
new file mode 100644
index 0000000000..a53b896848
--- /dev/null
+++ b/examples/itemviews/simpledommodel/simpledommodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Simple DOM Model
+Exec=/opt/usr/bin/simpledommodel
+Icon=simpledommodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/simpledommodel/simpledommodel.pro b/examples/itemviews/simpledommodel/simpledommodel.pro
index ece9ef9505..4044ae397d 100644
--- a/examples/itemviews/simpledommodel/simpledommodel.pro
+++ b/examples/itemviews/simpledommodel/simpledommodel.pro
@@ -15,3 +15,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/simpledommodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/simpletreemodel/main.cpp b/examples/itemviews/simpletreemodel/main.cpp
index 1cca36328f..15e6bc3e76 100644
--- a/examples/itemviews/simpletreemodel/main.cpp
+++ b/examples/itemviews/simpletreemodel/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.desktop b/examples/itemviews/simpletreemodel/simpletreemodel.desktop
new file mode 100644
index 0000000000..361202f5c0
--- /dev/null
+++ b/examples/itemviews/simpletreemodel/simpletreemodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Simple Tree Model
+Exec=/opt/usr/bin/simpletreemodel
+Icon=simpletreemodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/simpletreemodel/simpletreemodel.pro b/examples/itemviews/simpletreemodel/simpletreemodel.pro
index 50053b1f65..336544d9fb 100644
--- a/examples/itemviews/simpletreemodel/simpletreemodel.pro
+++ b/examples/itemviews/simpletreemodel/simpletreemodel.pro
@@ -14,3 +14,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/simplewidgetmapper/main.cpp b/examples/itemviews/simplewidgetmapper/main.cpp
index 41e756d8ad..9e45edefac 100644
--- a/examples/itemviews/simplewidgetmapper/main.cpp
+++ b/examples/itemviews/simplewidgetmapper/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop
new file mode 100644
index 0000000000..6b09a236da
--- /dev/null
+++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Simple Widget Mapper
+Exec=/opt/usr/bin/simplewidgetmapper
+Icon=simplewidgetmapper
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
index 4f6008cacd..b496064234 100644
--- a/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
+++ b/examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro
@@ -10,3 +10,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/itemviews/spinboxdelegate/main.cpp b/examples/itemviews/spinboxdelegate/main.cpp
index e078d7f2df..50d2ef1323 100644
--- a/examples/itemviews/spinboxdelegate/main.cpp
+++ b/examples/itemviews/spinboxdelegate/main.cpp
@@ -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]
diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.desktop b/examples/itemviews/spinboxdelegate/spinboxdelegate.desktop
new file mode 100644
index 0000000000..347e408e96
--- /dev/null
+++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Spin Box Delegate
+Exec=/opt/usr/bin/spinboxdelegate
+Icon=spinboxdelegate
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
index 42b852eb7a..1859252626 100644
--- a/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
+++ b/examples/itemviews/spinboxdelegate/spinboxdelegate.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/itemviews/stardelegate/main.cpp b/examples/itemviews/stardelegate/main.cpp
index 78245d005b..a9d5e96655 100644
--- a/examples/itemviews/stardelegate/main.cpp
+++ b/examples/itemviews/stardelegate/main.cpp
@@ -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();
}
diff --git a/examples/itemviews/stardelegate/stardelegate.desktop b/examples/itemviews/stardelegate/stardelegate.desktop
new file mode 100644
index 0000000000..d508c3b286
--- /dev/null
+++ b/examples/itemviews/stardelegate/stardelegate.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Star Delegate
+Exec=/opt/usr/bin/stardelegate
+Icon=stardelegate
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/itemviews/stardelegate/stardelegate.pro b/examples/itemviews/stardelegate/stardelegate.pro
index c4dd65dd00..56679be0a4 100644
--- a/examples/itemviews/stardelegate/stardelegate.pro
+++ b/examples/itemviews/stardelegate/stardelegate.pro
@@ -13,5 +13,9 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/itemviews/stardelegate
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/ja_JP/linguist/hellotr/hellotr.pro b/examples/ja_JP/linguist/hellotr/hellotr.pro
index 1be6f4c141..ab51bc8082 100644
--- a/examples/ja_JP/linguist/hellotr/hellotr.pro
+++ b/examples/ja_JP/linguist/hellotr/hellotr.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/layouts/basiclayouts/basiclayouts.desktop b/examples/layouts/basiclayouts/basiclayouts.desktop
new file mode 100644
index 0000000000..6c612eed09
--- /dev/null
+++ b/examples/layouts/basiclayouts/basiclayouts.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Basic Layouts
+Exec=/opt/usr/bin/basiclayouts
+Icon=basiclayouts
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/layouts/basiclayouts/basiclayouts.pro b/examples/layouts/basiclayouts/basiclayouts.pro
index 2bbb3be0e8..7751e139e7 100644
--- a/examples/layouts/basiclayouts/basiclayouts.pro
+++ b/examples/layouts/basiclayouts/basiclayouts.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/layouts/basiclayouts/main.cpp b/examples/layouts/basiclayouts/main.cpp
index 8aa11f488d..6b6077546f 100644
--- a/examples/layouts/basiclayouts/main.cpp
+++ b/examples/layouts/basiclayouts/main.cpp
@@ -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();
}
diff --git a/examples/layouts/borderlayout/borderlayout.desktop b/examples/layouts/borderlayout/borderlayout.desktop
new file mode 100644
index 0000000000..3fd0641f1c
--- /dev/null
+++ b/examples/layouts/borderlayout/borderlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Border Layout
+Exec=/opt/usr/bin/borderlayout
+Icon=borderlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/layouts/borderlayout/borderlayout.pro b/examples/layouts/borderlayout/borderlayout.pro
index 3880d876d2..76a939daa4 100644
--- a/examples/layouts/borderlayout/borderlayout.pro
+++ b/examples/layouts/borderlayout/borderlayout.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/layouts/borderlayout/main.cpp b/examples/layouts/borderlayout/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/layouts/borderlayout/main.cpp
+++ b/examples/layouts/borderlayout/main.cpp
@@ -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();
}
diff --git a/examples/layouts/dynamiclayouts/dialog.cpp b/examples/layouts/dynamiclayouts/dialog.cpp
index 6e4f1efebc..d07903d8aa 100644
--- a/examples/layouts/dynamiclayouts/dialog.cpp
+++ b/examples/layouts/dynamiclayouts/dialog.cpp
@@ -43,7 +43,11 @@
#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();
diff --git a/examples/layouts/dynamiclayouts/dialog.h b/examples/layouts/dynamiclayouts/dialog.h
index 9409be1b57..3ada992858 100644
--- a/examples/layouts/dynamiclayouts/dialog.h
+++ b/examples/layouts/dynamiclayouts/dialog.h
@@ -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
diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.desktop b/examples/layouts/dynamiclayouts/dynamiclayouts.desktop
new file mode 100644
index 0000000000..482286bfb8
--- /dev/null
+++ b/examples/layouts/dynamiclayouts/dynamiclayouts.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Dynamic Layouts
+Exec=/opt/usr/bin/dynamiclayouts
+Icon=dynamiclayouts
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/layouts/dynamiclayouts/dynamiclayouts.pro b/examples/layouts/dynamiclayouts/dynamiclayouts.pro
index 2ebe42a8dd..f6ab7791aa 100644
--- a/examples/layouts/dynamiclayouts/dynamiclayouts.pro
+++ b/examples/layouts/dynamiclayouts/dynamiclayouts.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/layouts/dynamiclayouts/main.cpp b/examples/layouts/dynamiclayouts/main.cpp
index 8aa11f488d..c30db12bb5 100644
--- a/examples/layouts/dynamiclayouts/main.cpp
+++ b/examples/layouts/dynamiclayouts/main.cpp
@@ -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();
}
diff --git a/examples/layouts/flowlayout/flowlayout.desktop b/examples/layouts/flowlayout/flowlayout.desktop
new file mode 100644
index 0000000000..54ea3b0290
--- /dev/null
+++ b/examples/layouts/flowlayout/flowlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Flow Layout
+Exec=/opt/usr/bin/flowlayout
+Icon=flowlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/layouts/flowlayout/flowlayout.pro b/examples/layouts/flowlayout/flowlayout.pro
index ccc8481a68..f59c4bc835 100644
--- a/examples/layouts/flowlayout/flowlayout.pro
+++ b/examples/layouts/flowlayout/flowlayout.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/layouts/flowlayout/main.cpp b/examples/layouts/flowlayout/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/layouts/flowlayout/main.cpp
+++ b/examples/layouts/flowlayout/main.cpp
@@ -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();
}
diff --git a/examples/layouts/flowlayout/window.cpp b/examples/layouts/flowlayout/window.cpp
index f5f6e293b2..50782b9822 100644
--- a/examples/layouts/flowlayout/window.cpp
+++ b/examples/layouts/flowlayout/window.cpp
@@ -56,4 +56,4 @@ Window::Window()
setWindowTitle(tr("Flow Layout"));
}
-//! [1] \ No newline at end of file
+//! [1]
diff --git a/examples/layouts/layouts.pro b/examples/layouts/layouts.pro
index 58bde873a4..f1940c1421 100644
--- a/examples/layouts/layouts.pro
+++ b/examples/layouts/layouts.pro
@@ -11,3 +11,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/linguist/arrowpad/arrowpad.pro b/examples/linguist/arrowpad/arrowpad.pro
index 77ee6ac70e..8181ee07cb 100644
--- a/examples/linguist/arrowpad/arrowpad.pro
+++ b/examples/linguist/arrowpad/arrowpad.pro
@@ -17,3 +17,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/linguist/hellotr/hellotr.pro b/examples/linguist/hellotr/hellotr.pro
index 2c258a2d5b..0a3ed48dfb 100644
--- a/examples/linguist/hellotr/hellotr.pro
+++ b/examples/linguist/hellotr/hellotr.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/linguist/linguist.pro b/examples/linguist/linguist.pro
index d335e6ac27..416a6e6c9d 100644
--- a/examples/linguist/linguist.pro
+++ b/examples/linguist/linguist.pro
@@ -10,3 +10,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/linguist/trollprint/trollprint.pro b/examples/linguist/trollprint/trollprint.pro
index 50524c29ed..0588424ff7 100644
--- a/examples/linguist/trollprint/trollprint.pro
+++ b/examples/linguist/trollprint/trollprint.pro
@@ -13,3 +13,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/mainwindows/application/application.desktop b/examples/mainwindows/application/application.desktop
new file mode 100644
index 0000000000..b6fab1f1fe
--- /dev/null
+++ b/examples/mainwindows/application/application.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Application
+Exec=/opt/usr/bin/application
+Icon=application
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/mainwindows/application/application.pro b/examples/mainwindows/application/application.pro
index f98d3afd3c..f66fa5fb62 100644
--- a/examples/mainwindows/application/application.pro
+++ b/examples/mainwindows/application/application.pro
@@ -13,3 +13,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/mainwindows/application/main.cpp b/examples/mainwindows/application/main.cpp
index 9a9dc9ca76..14c7af2bb3 100644
--- a/examples/mainwindows/application/main.cpp
+++ b/examples/mainwindows/application/main.cpp
@@ -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]
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.desktop b/examples/mainwindows/dockwidgets/dockwidgets.desktop
new file mode 100644
index 0000000000..1f57cb613b
--- /dev/null
+++ b/examples/mainwindows/dockwidgets/dockwidgets.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Dock Widgets
+Exec=/opt/usr/bin/dockwidgets
+Icon=dockwidgets
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro
index 48aad1a620..6a155f6edd 100644
--- a/examples/mainwindows/dockwidgets/dockwidgets.pro
+++ b/examples/mainwindows/dockwidgets/dockwidgets.pro
@@ -11,3 +11,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/mainwindows/mainwindows.pro b/examples/mainwindows/mainwindows.pro
index 347fedac62..f685744228 100644
--- a/examples/mainwindows/mainwindows.pro
+++ b/examples/mainwindows/mainwindows.pro
@@ -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
@@ -18,3 +13,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/mainwindows/mdi/main.cpp b/examples/mainwindows/mdi/main.cpp
index 1a10a19619..4e21e75159 100644
--- a/examples/mainwindows/mdi/main.cpp
+++ b/examples/mainwindows/mdi/main.cpp
@@ -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();
}
diff --git a/examples/mainwindows/mdi/mdi.desktop b/examples/mainwindows/mdi/mdi.desktop
new file mode 100644
index 0000000000..267e6f19d0
--- /dev/null
+++ b/examples/mainwindows/mdi/mdi.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=MDI
+Exec=/opt/usr/bin/mdi
+Icon=mdi
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/mainwindows/mdi/mdi.pro b/examples/mainwindows/mdi/mdi.pro
index 45f3bfb4a8..3112128d9b 100644
--- a/examples/mainwindows/mdi/mdi.pro
+++ b/examples/mainwindows/mdi/mdi.pro
@@ -13,3 +13,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/mainwindows/menus/main.cpp b/examples/mainwindows/menus/main.cpp
index 01c8adae53..dffe80348a 100644
--- a/examples/mainwindows/menus/main.cpp
+++ b/examples/mainwindows/menus/main.cpp
@@ -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();
}
diff --git a/examples/mainwindows/menus/mainwindow.cpp b/examples/mainwindows/menus/mainwindow.cpp
index 2a1c3da71d..eae4e6e9ec 100644
--- a/examples/mainwindows/menus/mainwindow.cpp
+++ b/examples/mainwindows/menus/mainwindow.cpp
@@ -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);
diff --git a/examples/mainwindows/menus/menus.desktop b/examples/mainwindows/menus/menus.desktop
new file mode 100644
index 0000000000..dc2bda92af
--- /dev/null
+++ b/examples/mainwindows/menus/menus.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Menus
+Exec=/opt/usr/bin/menus
+Icon=menus
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/mainwindows/menus/menus.pro b/examples/mainwindows/menus/menus.pro
index f440f35423..cf117c25d2 100644
--- a/examples/mainwindows/menus/menus.pro
+++ b/examples/mainwindows/menus/menus.pro
@@ -13,3 +13,6 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/mainwindows/recentfiles/main.cpp b/examples/mainwindows/recentfiles/main.cpp
index 3bbf0137c1..37891b3983 100644
--- a/examples/mainwindows/recentfiles/main.cpp
+++ b/examples/mainwindows/recentfiles/main.cpp
@@ -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();
}
diff --git a/examples/mainwindows/recentfiles/recentfiles.desktop b/examples/mainwindows/recentfiles/recentfiles.desktop
new file mode 100644
index 0000000000..c314cf7f7c
--- /dev/null
+++ b/examples/mainwindows/recentfiles/recentfiles.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Recent Files
+Exec=/opt/usr/bin/recentfiles
+Icon=recentfiles
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/mainwindows/recentfiles/recentfiles.pro b/examples/mainwindows/recentfiles/recentfiles.pro
index 05da6f2972..ecc78f245a 100644
--- a/examples/mainwindows/recentfiles/recentfiles.pro
+++ b/examples/mainwindows/recentfiles/recentfiles.pro
@@ -10,3 +10,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/mainwindows/sdi/main.cpp b/examples/mainwindows/sdi/main.cpp
index 0fb8a0388d..ae3586cffc 100644
--- a/examples/mainwindows/sdi/main.cpp
+++ b/examples/mainwindows/sdi/main.cpp
@@ -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();
}
diff --git a/examples/mainwindows/sdi/sdi.desktop b/examples/mainwindows/sdi/sdi.desktop
new file mode 100644
index 0000000000..06d7289c8b
--- /dev/null
+++ b/examples/mainwindows/sdi/sdi.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=SDI
+Exec=/opt/usr/bin/sdi
+Icon=sdi
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/mainwindows/sdi/sdi.pro b/examples/mainwindows/sdi/sdi.pro
index 964b791936..c8687614c2 100644
--- a/examples/mainwindows/sdi/sdi.pro
+++ b/examples/mainwindows/sdi/sdi.pro
@@ -11,3 +11,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/network/bearercloud/bearercloud.desktop b/examples/network/bearercloud/bearercloud.desktop
new file mode 100644
index 0000000000..4e494e0475
--- /dev/null
+++ b/examples/network/bearercloud/bearercloud.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Bearer Cloud
+Exec=/opt/usr/bin/bearercloud
+Icon=bearercloud
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 942b19ce01..43ae8e9027 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -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();
diff --git a/examples/network/bearermonitor/bearermonitor.desktop b/examples/network/bearermonitor/bearermonitor.desktop
new file mode 100644
index 0000000000..14f1094d17
--- /dev/null
+++ b/examples/network/bearermonitor/bearermonitor.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Bearer Monitor
+Exec=/opt/usr/bin/bearermonitor
+Icon=bearermonitor
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h
index a06522fafa..f4dbf81dee 100644
--- a/examples/network/bearermonitor/bearermonitor.h
+++ b/examples/network/bearermonitor/bearermonitor.h
@@ -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
diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro
index e9dbf25b98..20cefbf669 100644
--- a/examples/network/bearermonitor/bearermonitor.pro
+++ b/examples/network/bearermonitor/bearermonitor.pro
@@ -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)
diff --git a/examples/network/blockingfortuneclient/blockingclient.cpp b/examples/network/blockingfortuneclient/blockingclient.cpp
index e4ca17a6fd..0491433d56 100644
--- a/examples/network/blockingfortuneclient/blockingclient.cpp
+++ b/examples/network/blockingfortuneclient/blockingclient.cpp
@@ -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
}
diff --git a/examples/network/blockingfortuneclient/blockingclient.h b/examples/network/blockingfortuneclient/blockingclient.h
index 8b76fa6596..83ff93b228 100644
--- a/examples/network/blockingfortuneclient/blockingclient.h
+++ b/examples/network/blockingfortuneclient/blockingclient.h
@@ -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;
diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.desktop b/examples/network/blockingfortuneclient/blockingfortuneclient.desktop
new file mode 100644
index 0000000000..87b13092ae
--- /dev/null
+++ b/examples/network/blockingfortuneclient/blockingfortuneclient.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Blocking Fortune Client
+Exec=/opt/usr/bin/blockingfortuneclient
+Icon=blockingfortuneclient
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/blockingfortuneclient/blockingfortuneclient.pro b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
index 29abbeb43e..3fe6f7c7ab 100644
--- a/examples/network/blockingfortuneclient/blockingfortuneclient.pro
+++ b/examples/network/blockingfortuneclient/blockingfortuneclient.pro
@@ -13,4 +13,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)
diff --git a/examples/network/blockingfortuneclient/main.cpp b/examples/network/blockingfortuneclient/main.cpp
index d1ff1659af..97ce59fdb3 100644
--- a/examples/network/blockingfortuneclient/main.cpp
+++ b/examples/network/blockingfortuneclient/main.cpp
@@ -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();
}
diff --git a/examples/network/broadcastreceiver/broadcastreceiver.desktop b/examples/network/broadcastreceiver/broadcastreceiver.desktop
new file mode 100644
index 0000000000..29072ed8b1
--- /dev/null
+++ b/examples/network/broadcastreceiver/broadcastreceiver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Broadcast Receiver
+Exec=/opt/usr/bin/broadcastreceiver
+Icon=broadcastreceiver
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/broadcastreceiver/broadcastreceiver.pro b/examples/network/broadcastreceiver/broadcastreceiver.pro
index d7924b870a..bc6b0ee55a 100644
--- a/examples/network/broadcastreceiver/broadcastreceiver.pro
+++ b/examples/network/broadcastreceiver/broadcastreceiver.pro
@@ -11,4 +11,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
diff --git a/examples/network/broadcastreceiver/main.cpp b/examples/network/broadcastreceiver/main.cpp
index 041163178d..80d0bba869 100644
--- a/examples/network/broadcastreceiver/main.cpp
+++ b/examples/network/broadcastreceiver/main.cpp
@@ -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();
}
diff --git a/examples/network/broadcastreceiver/receiver.cpp b/examples/network/broadcastreceiver/receiver.cpp
index 72a5d7023d..e0830283a9 100644
--- a/examples/network/broadcastreceiver/receiver.cpp
+++ b/examples/network/broadcastreceiver/receiver.cpp
@@ -44,10 +44,18 @@
#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"));
}
diff --git a/examples/network/broadcastreceiver/receiver.h b/examples/network/broadcastreceiver/receiver.h
index 80b35a5571..3084da1e26 100644
--- a/examples/network/broadcastreceiver/receiver.h
+++ b/examples/network/broadcastreceiver/receiver.h
@@ -41,15 +41,16 @@
#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;
};
diff --git a/examples/network/broadcastsender/broadcastsender.desktop b/examples/network/broadcastsender/broadcastsender.desktop
new file mode 100644
index 0000000000..2690a15e66
--- /dev/null
+++ b/examples/network/broadcastsender/broadcastsender.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Broadcast Sender
+Exec=/opt/usr/bin/broadcastsender
+Icon=broadcastsender
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/broadcastsender/broadcastsender.pro b/examples/network/broadcastsender/broadcastsender.pro
index a5751d2f71..0944164e7c 100644
--- a/examples/network/broadcastsender/broadcastsender.pro
+++ b/examples/network/broadcastsender/broadcastsender.pro
@@ -11,4 +11,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
diff --git a/examples/network/broadcastsender/main.cpp b/examples/network/broadcastsender/main.cpp
index 56e35c9540..88be21d2d8 100644
--- a/examples/network/broadcastsender/main.cpp
+++ b/examples/network/broadcastsender/main.cpp
@@ -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();
}
diff --git a/examples/network/broadcastsender/sender.cpp b/examples/network/broadcastsender/sender.cpp
index 55d91d2d20..33b34a4a4c 100644
--- a/examples/network/broadcastsender/sender.cpp
+++ b/examples/network/broadcastsender/sender.cpp
@@ -44,9 +44,10 @@
#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"));
diff --git a/examples/network/broadcastsender/sender.h b/examples/network/broadcastsender/sender.h
index d592051efd..666269f38e 100644
--- a/examples/network/broadcastsender/sender.h
+++ b/examples/network/broadcastsender/sender.h
@@ -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
diff --git a/examples/network/download/download.desktop b/examples/network/download/download.desktop
new file mode 100644
index 0000000000..8dbdfe872f
--- /dev/null
+++ b/examples/network/download/download.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Network Download
+Exec=/opt/usr/bin/download
+Icon=download
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/download/download.pro b/examples/network/download/download.pro
index 4bea359f16..a3b270d252 100644
--- a/examples/network/download/download.pro
+++ b/examples/network/download/download.pro
@@ -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)
diff --git a/examples/network/downloadmanager/downloadmanager.desktop b/examples/network/downloadmanager/downloadmanager.desktop
new file mode 100644
index 0000000000..d046340c6f
--- /dev/null
+++ b/examples/network/downloadmanager/downloadmanager.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Network Download Manager
+Exec=/opt/usr/bin/downloadmanager
+Icon=downloadmanager
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/downloadmanager/downloadmanager.pro b/examples/network/downloadmanager/downloadmanager.pro
index 8855aae94c..2f83f41afc 100644
--- a/examples/network/downloadmanager/downloadmanager.pro
+++ b/examples/network/downloadmanager/downloadmanager.pro
@@ -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)
diff --git a/examples/network/fortuneclient/fortuneclient.desktop b/examples/network/fortuneclient/fortuneclient.desktop
new file mode 100644
index 0000000000..dc801ed026
--- /dev/null
+++ b/examples/network/fortuneclient/fortuneclient.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Fortune Client
+Exec=/opt/usr/bin/fortuneclient
+Icon=fortuneclient
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/fortuneclient/fortuneclient.pro b/examples/network/fortuneclient/fortuneclient.pro
index 25f2e6745e..357063b987 100644
--- a/examples/network/fortuneclient/fortuneclient.pro
+++ b/examples/network/fortuneclient/fortuneclient.pro
@@ -16,3 +16,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)
diff --git a/examples/network/fortuneserver/fortuneserver.desktop b/examples/network/fortuneserver/fortuneserver.desktop
new file mode 100644
index 0000000000..8c936e8b9e
--- /dev/null
+++ b/examples/network/fortuneserver/fortuneserver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Fortune Server
+Exec=/opt/usr/bin/fortuneserver
+Icon=fortuneserver
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/fortuneserver/fortuneserver.pro b/examples/network/fortuneserver/fortuneserver.pro
index 056673ae7a..a385f1153a 100644
--- a/examples/network/fortuneserver/fortuneserver.pro
+++ b/examples/network/fortuneserver/fortuneserver.pro
@@ -17,3 +17,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)
diff --git a/examples/network/googlesuggest/googlesuggest.desktop b/examples/network/googlesuggest/googlesuggest.desktop
new file mode 100644
index 0000000000..5034e2398c
--- /dev/null
+++ b/examples/network/googlesuggest/googlesuggest.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Google Suggest
+Exec=/opt/usr/bin/googlesuggest
+Icon=googlesuggest
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/googlesuggest/googlesuggest.pro b/examples/network/googlesuggest/googlesuggest.pro
index 58343d473a..6616ec0f3e 100644
--- a/examples/network/googlesuggest/googlesuggest.pro
+++ b/examples/network/googlesuggest/googlesuggest.pro
@@ -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)
diff --git a/examples/network/http/http.desktop b/examples/network/http/http.desktop
new file mode 100644
index 0000000000..ce35e51947
--- /dev/null
+++ b/examples/network/http/http.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=HTTP
+Exec=/opt/usr/bin/http
+Icon=http
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/http/http.pro b/examples/network/http/http.pro
index 57618b3137..6f4b7be076 100644
--- a/examples/network/http/http.pro
+++ b/examples/network/http/http.pro
@@ -12,4 +12,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
diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp
index 1eceb4927e..77c1e314c7 100644
--- a/examples/network/http/httpwindow.cpp
+++ b/examples/network/http/httpwindow.cpp
@@ -45,7 +45,11 @@
#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()
diff --git a/examples/network/http/httpwindow.h b/examples/network/http/httpwindow.h
index 0ec87af48a..8bbe1a261a 100644
--- a/examples/network/http/httpwindow.h
+++ b/examples/network/http/httpwindow.h
@@ -41,7 +41,11 @@
#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;
diff --git a/examples/network/http/main.cpp b/examples/network/http/main.cpp
index 4c4f61c775..e4f157476c 100644
--- a/examples/network/http/main.cpp
+++ b/examples/network/http/main.cpp
@@ -39,13 +39,28 @@
****************************************************************************/
#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();
}
diff --git a/examples/network/loopback/dialog.cpp b/examples/network/loopback/dialog.cpp
index 0dc1e1f8e4..f9a51268b7 100644
--- a/examples/network/loopback/dialog.cpp
+++ b/examples/network/loopback/dialog.cpp
@@ -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
diff --git a/examples/network/loopback/dialog.h b/examples/network/loopback/dialog.h
index 09b4366e19..b48c090d3f 100644
--- a/examples/network/loopback/dialog.h
+++ b/examples/network/loopback/dialog.h
@@ -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;
diff --git a/examples/network/loopback/loopback.desktop b/examples/network/loopback/loopback.desktop
new file mode 100644
index 0000000000..ee982153c4
--- /dev/null
+++ b/examples/network/loopback/loopback.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Loopback
+Exec=/opt/usr/bin/loopback
+Icon=loopback
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/loopback/loopback.pro b/examples/network/loopback/loopback.pro
index e8220aea40..c96868fb40 100644
--- a/examples/network/loopback/loopback.pro
+++ b/examples/network/loopback/loopback.pro
@@ -11,4 +11,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
diff --git a/examples/network/loopback/main.cpp b/examples/network/loopback/main.cpp
index 6810b795fc..7f26fd4357 100644
--- a/examples/network/loopback/main.cpp
+++ b/examples/network/loopback/main.cpp
@@ -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();
}
diff --git a/examples/network/network-chat/network-chat.desktop b/examples/network/network-chat/network-chat.desktop
new file mode 100644
index 0000000000..ba3eeb36c5
--- /dev/null
+++ b/examples/network/network-chat/network-chat.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Network Chat
+Exec=/opt/usr/bin/network-chat
+Icon=network-chat
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/network-chat/network-chat.pro b/examples/network/network-chat/network-chat.pro
index 91c832d149..05f97f6183 100644
--- a/examples/network/network-chat/network-chat.pro
+++ b/examples/network/network-chat/network-chat.pro
@@ -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)
diff --git a/examples/network/network.pro b/examples/network/network.pro
index c705b9eb32..90079f9b50 100644
--- a/examples/network/network.pro
+++ b/examples/network/network.pro
@@ -36,3 +36,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index 562b9fe4aa..1c0d057c66 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -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]
diff --git a/examples/network/qftp/qftp.desktop b/examples/network/qftp/qftp.desktop
new file mode 100644
index 0000000000..6149fe96df
--- /dev/null
+++ b/examples/network/qftp/qftp.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=FTP
+Exec=/opt/usr/bin/qftp
+Icon=qftp
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/qftp/qftp.pro b/examples/network/qftp/qftp.pro
index 5a64e35c47..b3c98bca7a 100644
--- a/examples/network/qftp/qftp.pro
+++ b/examples/network/qftp/qftp.pro
@@ -18,3 +18,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)
diff --git a/examples/network/securesocketclient/certificateinfo.cpp b/examples/network/securesocketclient/certificateinfo.cpp
index ff3a4d2f3c..b1a9acb0b2 100644
--- a/examples/network/securesocketclient/certificateinfo.cpp
+++ b/examples/network/securesocketclient/certificateinfo.cpp
@@ -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)
diff --git a/examples/network/securesocketclient/certificateinfo.ui b/examples/network/securesocketclient/certificateinfo.ui
index 3761fe8f50..c5238eb3e1 100644
--- a/examples/network/securesocketclient/certificateinfo.ui
+++ b/examples/network/securesocketclient/certificateinfo.ui
@@ -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>
@@ -9,42 +10,57 @@
<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>
@@ -71,11 +87,11 @@
<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>
diff --git a/examples/network/securesocketclient/main.cpp b/examples/network/securesocketclient/main.cpp
index c15534b523..ca50f31dcf 100644
--- a/examples/network/securesocketclient/main.cpp
+++ b/examples/network/securesocketclient/main.cpp
@@ -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();
}
diff --git a/examples/network/securesocketclient/securesocketclient.desktop b/examples/network/securesocketclient/securesocketclient.desktop
new file mode 100644
index 0000000000..8335b27e33
--- /dev/null
+++ b/examples/network/securesocketclient/securesocketclient.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Secure Socket Client
+Exec=/opt/usr/bin/securesocketclient
+Icon=securesocketclient
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/securesocketclient/securesocketclient.pro b/examples/network/securesocketclient/securesocketclient.pro
index 76720b8cf3..94c01cd757 100644
--- a/examples/network/securesocketclient/securesocketclient.pro
+++ b/examples/network/securesocketclient/securesocketclient.pro
@@ -18,4 +18,7 @@ INSTALLS += target sources
symbian {
TARGET.UID3 = 0xA000CF67
CONFIG += qt_example
+ TARGET.CAPABILITY = NetworkServices
}
+maemo5: CONFIG += qt_example
+
diff --git a/examples/network/securesocketclient/sslclient.cpp b/examples/network/securesocketclient/sslclient.cpp
index 7aac7b1038..9d6af86813 100644
--- a/examples/network/securesocketclient/sslclient.cpp
+++ b/examples/network/securesocketclient/sslclient.cpp
@@ -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();
}
diff --git a/examples/network/securesocketclient/sslclient.ui b/examples/network/securesocketclient/sslclient.ui
index 5a24751168..4b81fe46eb 100644
--- a/examples/network/securesocketclient/sslclient.ui
+++ b/examples/network/securesocketclient/sslclient.ui
@@ -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>
@@ -9,147 +10,149 @@
<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>
diff --git a/examples/network/securesocketclient/sslerrors.ui b/examples/network/securesocketclient/sslerrors.ui
index 4aac18cddb..1aadbfeca5 100644
--- a/examples/network/securesocketclient/sslerrors.ui
+++ b/examples/network/securesocketclient/sslerrors.ui
@@ -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>
@@ -9,44 +10,48 @@
<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>
diff --git a/examples/network/threadedfortuneserver/dialog.cpp b/examples/network/threadedfortuneserver/dialog.cpp
index b46beadd07..e62076130d 100644
--- a/examples/network/threadedfortuneserver/dialog.cpp
+++ b/examples/network/threadedfortuneserver/dialog.cpp
@@ -47,11 +47,18 @@
#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"));
}
diff --git a/examples/network/threadedfortuneserver/dialog.h b/examples/network/threadedfortuneserver/dialog.h
index 10ae3ebaa2..19a6fc2f47 100644
--- a/examples/network/threadedfortuneserver/dialog.h
+++ b/examples/network/threadedfortuneserver/dialog.h
@@ -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
diff --git a/examples/network/threadedfortuneserver/main.cpp b/examples/network/threadedfortuneserver/main.cpp
index 396f9244b6..1e245e9e01 100644
--- a/examples/network/threadedfortuneserver/main.cpp
+++ b/examples/network/threadedfortuneserver/main.cpp
@@ -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();
}
diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.desktop b/examples/network/threadedfortuneserver/threadedfortuneserver.desktop
new file mode 100644
index 0000000000..509e24493f
--- /dev/null
+++ b/examples/network/threadedfortuneserver/threadedfortuneserver.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Threaded Fortune Server
+Exec=/opt/usr/bin/threadedfortuneserver
+Icon=threadedfortuneserver
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/threadedfortuneserver/threadedfortuneserver.pro b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
index 21beac7529..1b4cd598a2 100644
--- a/examples/network/threadedfortuneserver/threadedfortuneserver.pro
+++ b/examples/network/threadedfortuneserver/threadedfortuneserver.pro
@@ -15,4 +15,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)
diff --git a/examples/network/torrent/torrent.desktop b/examples/network/torrent/torrent.desktop
new file mode 100644
index 0000000000..59db3d312d
--- /dev/null
+++ b/examples/network/torrent/torrent.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Torrent
+Exec=/opt/usr/bin/torrent
+Icon=torrent
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/network/torrent/torrent.pro b/examples/network/torrent/torrent.pro
index 4e2aaa68ef..b2da8b6b56 100644
--- a/examples/network/torrent/torrent.pro
+++ b/examples/network/torrent/torrent.pro
@@ -39,3 +39,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)
diff --git a/examples/opengl/2dpainting/2dpainting.desktop b/examples/opengl/2dpainting/2dpainting.desktop
new file mode 100644
index 0000000000..0b3570df34
--- /dev/null
+++ b/examples/opengl/2dpainting/2dpainting.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=2D Painting
+Exec=/opt/usr/bin/2dpainting
+Icon=2dpainting
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/2dpainting/2dpainting.pro b/examples/opengl/2dpainting/2dpainting.pro
index 7014ce6949..5d361bc1bf 100644
--- a/examples/opengl/2dpainting/2dpainting.pro
+++ b/examples/opengl/2dpainting/2dpainting.pro
@@ -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)
diff --git a/examples/opengl/cube/cube.desktop b/examples/opengl/cube/cube.desktop
new file mode 100644
index 0000000000..627e5f2691
--- /dev/null
+++ b/examples/opengl/cube/cube.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Cube OpenGL ES 2.0
+Exec=/opt/usr/bin/cube
+Icon=cube
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/cube/cube.png b/examples/opengl/cube/cube.png
new file mode 100644
index 0000000000..42c8c51b3a
--- /dev/null
+++ b/examples/opengl/cube/cube.png
Binary files differ
diff --git a/examples/opengl/cube/cube.pro b/examples/opengl/cube/cube.pro
new file mode 100644
index 0000000000..64f6973c00
--- /dev/null
+++ b/examples/opengl/cube/cube.pro
@@ -0,0 +1,40 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-06-23T12:55:35
+#
+#-------------------------------------------------
+
+QT += core gui
+
+TARGET = cube
+TEMPLATE = app
+
+SOURCES += main.cpp
+
+contains(QT_CONFIG, opengl) {
+ message(Building with OpenGL support.)
+ QT += opengl
+
+ SOURCES += mainwidget.cpp \
+ geometryengine.cpp
+
+ HEADERS += \
+ mainwidget.h \
+ geometryengine.h
+
+ RESOURCES += \
+ shaders.qrc \
+ textures.qrc
+
+ OTHER_FILES += \
+ vshader.glsl \
+ fshader.glsl
+} else {
+ message(OpenGL support is not available.)
+}
+
+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)
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/opengl/cube/fshader.glsl b/examples/opengl/cube/fshader.glsl
new file mode 100644
index 0000000000..18068cf0e6
--- /dev/null
+++ b/examples/opengl/cube/fshader.glsl
@@ -0,0 +1,18 @@
+#ifdef GL_ES
+// Set default precision to medium
+precision mediump int;
+precision mediump float;
+#endif
+
+uniform sampler2D texture;
+
+varying vec2 v_texcoord;
+
+//! [0]
+void main()
+{
+ // Set fragment color from texture
+ gl_FragColor = texture2D(texture, v_texcoord);
+}
+//! [0]
+
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
new file mode 100644
index 0000000000..2f6f65948d
--- /dev/null
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -0,0 +1,130 @@
+#include "geometryengine.h"
+
+#include <QVector2D>
+#include <QVector3D>
+
+struct VertexData
+{
+ QVector3D position;
+ QVector2D texCoord;
+};
+
+GeometryEngine::GeometryEngine() : vboIds(new GLuint[2])
+{
+}
+
+GeometryEngine::~GeometryEngine()
+{
+ glDeleteBuffers(2, vboIds);
+ delete[] vboIds;
+}
+
+void GeometryEngine::init()
+{
+//! [0]
+ // Generate 2 VBOs
+ glGenBuffers(2, vboIds);
+
+//! [0]
+
+ // Initializes cube geometry and transfers it to VBOs
+ initCubeGeometry();
+}
+
+void GeometryEngine::initCubeGeometry()
+{
+ // For cube we would need only 8 vertices but we have to
+ // duplicate vertex for each face because texture coordinate
+ // is different.
+ VertexData vertices[] = {
+ // Vertex data for face 0
+ {QVector3D(-1.0, -1.0, 1.0), QVector2D(0.0, 0.0)}, // v0
+ {QVector3D( 1.0, -1.0, 1.0), QVector2D(0.33, 0.0)}, // v1
+ {QVector3D(-1.0, 1.0, 1.0), QVector2D(0.0, 0.5)}, // v2
+ {QVector3D( 1.0, 1.0, 1.0), QVector2D(0.33, 0.5)}, // v3
+
+ // Vertex data for face 1
+ {QVector3D( 1.0, -1.0, 1.0), QVector2D( 0.0, 0.5)}, // v4
+ {QVector3D( 1.0, -1.0, -1.0), QVector2D(0.33, 0.5)}, // v5
+ {QVector3D( 1.0, 1.0, 1.0), QVector2D(0.0, 1.0)}, // v6
+ {QVector3D( 1.0, 1.0, -1.0), QVector2D(0.33, 1.0)}, // v7
+
+ // Vertex data for face 2
+ {QVector3D( 1.0, -1.0, -1.0), QVector2D(0.66, 0.5)}, // v8
+ {QVector3D(-1.0, -1.0, -1.0), QVector2D(1.0, 0.5)}, // v9
+ {QVector3D( 1.0, 1.0, -1.0), QVector2D(0.66, 1.0)}, // v10
+ {QVector3D(-1.0, 1.0, -1.0), QVector2D(1.0, 1.0)}, // v11
+
+ // Vertex data for face 3
+ {QVector3D(-1.0, -1.0, -1.0), QVector2D(0.66, 0.0)}, // v12
+ {QVector3D(-1.0, -1.0, 1.0), QVector2D(1.0, 0.0)}, // v13
+ {QVector3D(-1.0, 1.0, -1.0), QVector2D(0.66, 0.5)}, // v14
+ {QVector3D(-1.0, 1.0, 1.0), QVector2D(1.0, 0.5)}, // v15
+
+ // Vertex data for face 4
+ {QVector3D(-1.0, -1.0, -1.0), QVector2D(0.33, 0.0)}, // v16
+ {QVector3D( 1.0, -1.0, -1.0), QVector2D(0.66, 0.0)}, // v17
+ {QVector3D(-1.0, -1.0, 1.0), QVector2D(0.33, 0.5)}, // v18
+ {QVector3D( 1.0, -1.0, 1.0), QVector2D(0.66, 0.5)}, // v19
+
+ // Vertex data for face 5
+ {QVector3D(-1.0, 1.0, 1.0), QVector2D(0.33, 0.5)}, // v20
+ {QVector3D( 1.0, 1.0, 1.0), QVector2D(0.66, 0.5)}, // v21
+ {QVector3D(-1.0, 1.0, -1.0), QVector2D(0.33, 1.0)}, // v22
+ {QVector3D( 1.0, 1.0, -1.0), QVector2D(0.66, 1.0)} // v23
+ };
+
+ // Indices for drawing cube faces using triangle strips.
+ // Triangle strips can be connected by duplicating indices
+ // between the strips. If connecting strips have opposite
+ // vertex order then last index of the first strip and first
+ // index of the second strip needs to be duplicated. If
+ // connecting strips have same vertex order then only last
+ // index of the first strip needs to be duplicated.
+ GLushort indices[] = {
+ 0, 1, 2, 3, 3, // Face 0 - triangle strip ( v0, v1, v2, v3)
+ 4, 4, 5, 6, 7, 7, // Face 1 - triangle strip ( v4, v5, v6, v7)
+ 8, 8, 9, 10, 11, 11, // Face 2 - triangle strip ( v8, v9, v10, v11)
+ 12, 12, 13, 14, 15, 15, // Face 3 - triangle strip (v12, v13, v14, v15)
+ 16, 16, 17, 18, 19, 19, // Face 4 - triangle strip (v16, v17, v18, v19)
+ 20, 20, 21, 22, 23 // Face 5 - triangle strip (v20, v21, v22, v23)
+ };
+
+//! [1]
+ // Transfer vertex data to VBO 0
+ glBindBuffer(GL_ARRAY_BUFFER, vboIds[0]);
+ glBufferData(GL_ARRAY_BUFFER, 24 * sizeof(VertexData), vertices, GL_STATIC_DRAW);
+
+ // Transfer index data to VBO 1
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vboIds[1]);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, 34 * sizeof(GLushort), indices, GL_STATIC_DRAW);
+//! [1]
+}
+
+//! [2]
+void GeometryEngine::drawCubeGeometry(QGLShaderProgram *program)
+{
+ // Tell OpenGL which VBOs to use
+ glBindBuffer(GL_ARRAY_BUFFER, vboIds[0]);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vboIds[1]);
+
+ // Offset for position
+ int offset = 0;
+
+ // Tell OpenGL programmable pipeline how to locate vertex position data
+ int vertexLocation = program->attributeLocation("a_position");
+ program->enableAttributeArray(vertexLocation);
+ glVertexAttribPointer(vertexLocation, 3, GL_FLOAT, GL_FALSE, sizeof(VertexData), (const void *)offset);
+
+ // Offset for texture coordinate
+ offset += sizeof(QVector3D);
+
+ // Tell OpenGL programmable pipeline how to locate vertex texture coordinate data
+ int texcoordLocation = program->attributeLocation("a_texcoord");
+ program->enableAttributeArray(texcoordLocation);
+ glVertexAttribPointer(texcoordLocation, 2, GL_FLOAT, GL_FALSE, sizeof(VertexData), (const void *)offset);
+
+ // Draw cube geometry using indices from VBO 1
+ glDrawElements(GL_TRIANGLE_STRIP, 34, GL_UNSIGNED_SHORT, 0);
+}
+//! [2]
diff --git a/examples/opengl/cube/geometryengine.h b/examples/opengl/cube/geometryengine.h
new file mode 100644
index 0000000000..d0fba694a2
--- /dev/null
+++ b/examples/opengl/cube/geometryengine.h
@@ -0,0 +1,24 @@
+#ifndef GEOMETRYENGINE_H
+#define GEOMETRYENGINE_H
+
+#include <QtOpenGL/QGLFunctions>
+#include <QtOpenGL/QGLShaderProgram>
+
+class GeometryEngine : protected QGLFunctions
+{
+public:
+ GeometryEngine();
+ virtual ~GeometryEngine();
+
+ void init();
+
+ void drawCubeGeometry(QGLShaderProgram *program);
+
+private:
+ void initCubeGeometry();
+
+ GLuint *vboIds;
+
+};
+
+#endif // GEOMETRYENGINE_H
diff --git a/examples/opengl/cube/main.cpp b/examples/opengl/cube/main.cpp
new file mode 100644
index 0000000000..faac8a0bd8
--- /dev/null
+++ b/examples/opengl/cube/main.cpp
@@ -0,0 +1,22 @@
+#include <QtGui/QApplication>
+#include <QLabel>
+
+#ifndef QT_NO_OPENGL
+#include "mainwidget.h"
+#endif
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ a.setApplicationName("cube");
+ a.setApplicationVersion("0.1");
+#ifndef QT_NO_OPENGL
+ MainWidget w;
+ w.resize(640, 480);
+ w.show();
+#else
+ QLabel * notifyLabel = new QLabel("OpenGL Support required");
+ notifyLabel->show();
+#endif
+ return a.exec();
+}
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
new file mode 100644
index 0000000000..bead5f79ed
--- /dev/null
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -0,0 +1,192 @@
+#include "mainwidget.h"
+
+#include "geometryengine.h"
+
+#include <QtOpenGL/QGLShaderProgram>
+
+#include <QBasicTimer>
+#include <QMouseEvent>
+
+#include <math.h>
+
+#include <QDebug>
+
+MainWidget::MainWidget(QWidget *parent) :
+ QGLWidget(parent),
+ timer(new QBasicTimer),
+ program(new QGLShaderProgram),
+ geometries(new GeometryEngine)
+{
+}
+
+MainWidget::~MainWidget()
+{
+ delete timer; timer = 0;
+ delete program; program = 0;
+ delete geometries; geometries = 0;
+
+ deleteTexture(texture);
+}
+
+//! [0]
+void MainWidget::mousePressEvent(QMouseEvent *e)
+{
+ // Saving mouse press position
+ mousePressPosition = QVector2D(e->posF());
+}
+
+void MainWidget::mouseReleaseEvent(QMouseEvent *e)
+{
+ // Mouse release position - mouse press position
+ QVector2D diff = QVector2D(e->posF()) - mousePressPosition;
+
+ // Rotation axis is perpendicular to the mouse position difference
+ // vector
+ QVector3D n = QVector3D(diff.y(), diff.x(), 0.0).normalized();
+
+ // Accelerate angular speed relative to the length of the mouse sweep
+ qreal acc = diff.length() / 100.0;
+
+ // Calculate new rotation axis as weighted sum
+ rotationAxis = (rotationAxis * angularSpeed + n * acc).normalized();
+
+ // Increase angular speed
+ angularSpeed += acc;
+}
+//! [0]
+
+//! [1]
+void MainWidget::timerEvent(QTimerEvent *e)
+{
+ Q_UNUSED(e);
+
+ // Decrease angular speed (friction)
+ angularSpeed *= 0.99;
+
+ // Stop rotation when speed goes below threshold
+ if (angularSpeed < 0.01)
+ angularSpeed = 0.0;
+ else {
+ // Update rotation
+ rotation = QQuaternion::fromAxisAndAngle(rotationAxis, angularSpeed) * rotation;
+
+ // Update scene
+ updateGL();
+ }
+}
+//! [1]
+
+void MainWidget::initializeGL()
+{
+ qglClearColor(Qt::black);
+
+ qDebug() << "Initializing shaders...";
+ initShaders();
+
+ qDebug() << "Initializing textures...";
+ initTextures();
+
+//! [2]
+ // Enable depth buffer
+ glEnable(GL_DEPTH_TEST);
+
+ // Enable back face culling
+ glEnable(GL_CULL_FACE);
+//! [2]
+
+ qDebug() << "Initializing geometries...";
+ geometries->init();
+
+ // using QBasicTimer because its faster that QTimer
+ timer->start(12, this);
+}
+
+//! [3]
+void MainWidget::initShaders()
+{
+ // Overriding system locale until shaders are compiled
+ setlocale(LC_NUMERIC, "C");
+
+ // Compiling vertex shader
+ if (!program->addShaderFromSourceFile(QGLShader::Vertex, ":/vshader.glsl"))
+ close();
+
+ // Compiling fragment shader
+ if (!program->addShaderFromSourceFile(QGLShader::Fragment, ":/fshader.glsl"))
+ close();
+
+ // Linking shader pipeline
+ if (!program->link())
+ close();
+
+ // Binding shader pipeline for use
+ if (!program->bind())
+ close();
+
+ // Restore system locale
+ setlocale(LC_ALL, "");
+}
+//! [3]
+
+//! [4]
+void MainWidget::initTextures()
+{
+ // Loading cube.png to texture unit 0
+ glActiveTexture(GL_TEXTURE0);
+ glEnable(GL_TEXTURE_2D);
+ texture = bindTexture(QImage(":/cube.png"));
+
+ // Set nearest filtering mode for texture minification
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+ // Set bilinear filtering mode for texture magnification
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+
+ // Wrap texture coordinates by repeating
+ // f.ex. texture coordinate (1.1, 1.2) is same as (0.1, 0.2)
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+}
+//! [4]
+
+//! [5]
+void MainWidget::resizeGL(int w, int h)
+{
+ // Set OpenGL viewport to cover whole widget
+ glViewport(0, 0, w, h);
+
+ // Calculate aspect ratio
+ qreal aspect = (qreal)w / ((qreal)h?h:1);
+
+ // Set near plane to 3.0, far plane to 7.0, field of view 45 degrees
+ const qreal zNear = 3.0, zFar = 7.0, fov = 45.0;
+
+ // Reset projection
+ projection.setToIdentity();
+
+ // Set perspective projection
+ projection.perspective(fov, aspect, zNear, zFar);
+}
+//! [5]
+
+void MainWidget::paintGL()
+{
+ // Clear color and depth buffer
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+//! [6]
+ // Calculate model view transformation
+ QMatrix4x4 matrix;
+ matrix.translate(0.0, 0.0, -5.0);
+ matrix.rotate(rotation);
+
+ // Set modelview-projection matrix
+ program->setUniformValue("mvp_matrix", projection * matrix);
+//! [6]
+
+ // Using texture unit 0 which contains cube.png
+ program->setUniformValue("texture", 0);
+
+ // Draw cube geometry
+ geometries->drawCubeGeometry(program);
+}
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
new file mode 100644
index 0000000000..595173b65d
--- /dev/null
+++ b/examples/opengl/cube/mainwidget.h
@@ -0,0 +1,53 @@
+#ifndef MAINWIDGET_H
+#define MAINWIDGET_H
+
+#include <QtOpenGL/QGLWidget>
+
+#include <QMatrix4x4>
+#include <QQuaternion>
+#include <QVector2D>
+
+class QBasicTimer;
+class QGLShaderProgram;
+
+class GeometryEngine;
+
+class MainWidget : public QGLWidget
+{
+ Q_OBJECT
+public:
+ explicit MainWidget(QWidget *parent = 0);
+ virtual ~MainWidget();
+
+signals:
+
+public slots:
+
+protected:
+ void mousePressEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+ void timerEvent(QTimerEvent *e);
+
+ void initializeGL();
+ void resizeGL(int w, int h);
+ void paintGL();
+
+ void initShaders();
+ void initTextures();
+
+private:
+ QBasicTimer *timer;
+ QGLShaderProgram *program;
+ GeometryEngine *geometries;
+
+ GLuint texture;
+
+ QMatrix4x4 projection;
+
+ QVector2D mousePressPosition;
+ QVector3D rotationAxis;
+ qreal angularSpeed;
+ QQuaternion rotation;
+};
+
+#endif // MAINWIDGET_H
diff --git a/examples/opengl/cube/shaders.qrc b/examples/opengl/cube/shaders.qrc
new file mode 100644
index 0000000000..bfc4b25111
--- /dev/null
+++ b/examples/opengl/cube/shaders.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>vshader.glsl</file>
+ <file>fshader.glsl</file>
+ </qresource>
+</RCC>
diff --git a/examples/opengl/cube/textures.qrc b/examples/opengl/cube/textures.qrc
new file mode 100644
index 0000000000..fe53be5e64
--- /dev/null
+++ b/examples/opengl/cube/textures.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>cube.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/opengl/cube/vshader.glsl b/examples/opengl/cube/vshader.glsl
new file mode 100644
index 0000000000..cfdc061852
--- /dev/null
+++ b/examples/opengl/cube/vshader.glsl
@@ -0,0 +1,24 @@
+#ifdef GL_ES
+// Set default precision to medium
+precision mediump int;
+precision mediump float;
+#endif
+
+uniform mat4 mvp_matrix;
+
+attribute vec4 a_position;
+attribute vec2 a_texcoord;
+
+varying vec2 v_texcoord;
+
+//! [0]
+void main()
+{
+ // Calculate vertex position in screen space
+ gl_Position = mvp_matrix * a_position;
+
+ // Pass texture coordinate to fragment shader
+ // Value will be automatically interpolated to fragments inside polygon faces
+ v_texcoord = a_texcoord;
+}
+//! [0]
diff --git a/examples/opengl/framebufferobject/framebufferobject.desktop b/examples/opengl/framebufferobject/framebufferobject.desktop
new file mode 100644
index 0000000000..5858deaabb
--- /dev/null
+++ b/examples/opengl/framebufferobject/framebufferobject.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Framebuffer Object
+Exec=/opt/usr/bin/framebufferobject
+Icon=framebufferobject
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/framebufferobject2/framebufferobject2.desktop b/examples/opengl/framebufferobject2/framebufferobject2.desktop
new file mode 100644
index 0000000000..6aed108ef6
--- /dev/null
+++ b/examples/opengl/framebufferobject2/framebufferobject2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Framebuffer Object 2
+Exec=/opt/usr/bin/framebufferobject2
+Icon=framebufferobject2
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/framebufferobject2/framebufferobject2.pro b/examples/opengl/framebufferobject2/framebufferobject2.pro
index 2ae20ca4b0..d3fce133fa 100644
--- a/examples/opengl/framebufferobject2/framebufferobject2.pro
+++ b/examples/opengl/framebufferobject2/framebufferobject2.pro
@@ -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)
diff --git a/examples/opengl/grabber/grabber.desktop b/examples/opengl/grabber/grabber.desktop
new file mode 100644
index 0000000000..76f31bea5c
--- /dev/null
+++ b/examples/opengl/grabber/grabber.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Grabber
+Exec=/opt/usr/bin/grabber
+Icon=grabber
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/grabber/grabber.pro b/examples/opengl/grabber/grabber.pro
index 7c46cebf52..6a73201cd2 100644
--- a/examples/opengl/grabber/grabber.pro
+++ b/examples/opengl/grabber/grabber.pro
@@ -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)
diff --git a/examples/opengl/hellogl/hellogl.desktop b/examples/opengl/hellogl/hellogl.desktop
new file mode 100644
index 0000000000..355e259846
--- /dev/null
+++ b/examples/opengl/hellogl/hellogl.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Hello GL
+Exec=/opt/usr/bin/hellogl
+Icon=hellogl
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/hellogl/hellogl.pro b/examples/opengl/hellogl/hellogl.pro
index 067d330d95..82372c5d98 100644
--- a/examples/opengl/hellogl/hellogl.pro
+++ b/examples/opengl/hellogl/hellogl.pro
@@ -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)
diff --git a/examples/opengl/hellogl_es/hellogl_es.desktop b/examples/opengl/hellogl_es/hellogl_es.desktop
new file mode 100644
index 0000000000..11c1dd795c
--- /dev/null
+++ b/examples/opengl/hellogl_es/hellogl_es.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Hello GL ES
+Exec=/opt/usr/bin/hellogl_es
+Icon=hellogl_es
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/hellogl_es/hellogl_es.pro b/examples/opengl/hellogl_es/hellogl_es.pro
index 181a90409a..ef0c1cdc3e 100644
--- a/examples/opengl/hellogl_es/hellogl_es.pro
+++ b/examples/opengl/hellogl_es/hellogl_es.pro
@@ -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)
diff --git a/examples/opengl/hellogl_es2/hellogl_es2.desktop b/examples/opengl/hellogl_es2/hellogl_es2.desktop
new file mode 100644
index 0000000000..2fe0adfc72
--- /dev/null
+++ b/examples/opengl/hellogl_es2/hellogl_es2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Hello GL ES 2
+Exec=/opt/usr/bin/hellogl_es2
+Icon=hellogl_es2
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/hellogl_es2/hellogl_es2.pro b/examples/opengl/hellogl_es2/hellogl_es2.pro
index 0f48f66233..ac7d3233b6 100644
--- a/examples/opengl/hellogl_es2/hellogl_es2.pro
+++ b/examples/opengl/hellogl_es2/hellogl_es2.pro
@@ -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)
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index ae381054a2..59ba7b8bd5 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -12,6 +12,7 @@ contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2){
}
} else {
SUBDIRS = 2dpainting \
+ cube \
grabber \
hellogl \
overpainting \
@@ -33,3 +34,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/opengl/overpainting/overpainting.desktop b/examples/opengl/overpainting/overpainting.desktop
new file mode 100644
index 0000000000..025300b922
--- /dev/null
+++ b/examples/opengl/overpainting/overpainting.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Overpainting
+Exec=/opt/usr/bin/overpainting
+Icon=overpainting
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/overpainting/overpainting.pro b/examples/opengl/overpainting/overpainting.pro
index 8da2a163c5..1584c3c3d4 100644
--- a/examples/opengl/overpainting/overpainting.pro
+++ b/examples/opengl/overpainting/overpainting.pro
@@ -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)
diff --git a/examples/opengl/pbuffers/pbuffers.desktop b/examples/opengl/pbuffers/pbuffers.desktop
new file mode 100644
index 0000000000..e5c5cee8c4
--- /dev/null
+++ b/examples/opengl/pbuffers/pbuffers.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Pixel Buffers
+Exec=/opt/usr/bin/pbuffers
+Icon=pbuffers
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/pbuffers/pbuffers.pro b/examples/opengl/pbuffers/pbuffers.pro
index b1ed04acc7..3264be3cef 100644
--- a/examples/opengl/pbuffers/pbuffers.pro
+++ b/examples/opengl/pbuffers/pbuffers.pro
@@ -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)
diff --git a/examples/opengl/pbuffers2/pbuffers2.desktop b/examples/opengl/pbuffers2/pbuffers2.desktop
new file mode 100644
index 0000000000..eed908c661
--- /dev/null
+++ b/examples/opengl/pbuffers2/pbuffers2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Pixel Buffers 2
+Exec=/opt/usr/bin/pbuffers2
+Icon=pbuffers2
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/pbuffers2/pbuffers2.pro b/examples/opengl/pbuffers2/pbuffers2.pro
index 2e71887c00..9b30d793b8 100644
--- a/examples/opengl/pbuffers2/pbuffers2.pro
+++ b/examples/opengl/pbuffers2/pbuffers2.pro
@@ -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)
diff --git a/examples/opengl/samplebuffers/samplebuffers.desktop b/examples/opengl/samplebuffers/samplebuffers.desktop
new file mode 100644
index 0000000000..d7bd43d95c
--- /dev/null
+++ b/examples/opengl/samplebuffers/samplebuffers.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Sample Buffers
+Exec=/opt/usr/bin/samplebuffers
+Icon=samplebuffers
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/samplebuffers/samplebuffers.pro b/examples/opengl/samplebuffers/samplebuffers.pro
index 8420d431e4..d8f9ff1cd7 100644
--- a/examples/opengl/samplebuffers/samplebuffers.pro
+++ b/examples/opengl/samplebuffers/samplebuffers.pro
@@ -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)
diff --git a/examples/opengl/textures/textures.desktop b/examples/opengl/textures/textures.desktop
new file mode 100644
index 0000000000..e8a40cdcd5
--- /dev/null
+++ b/examples/opengl/textures/textures.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Textures
+Exec=/opt/usr/bin/textures
+Icon=textures
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/opengl/textures/textures.pro b/examples/opengl/textures/textures.pro
index e67539a476..d8941b3890 100644
--- a/examples/opengl/textures/textures.pro
+++ b/examples/opengl/textures/textures.pro
@@ -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)
diff --git a/examples/openvg/openvg.desktop b/examples/openvg/openvg.desktop
new file mode 100644
index 0000000000..186699aef1
--- /dev/null
+++ b/examples/openvg/openvg.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=OpenVG Star
+Exec=/opt/usr/bin/openvg
+Icon=openvg
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/openvg/openvg.pro b/examples/openvg/openvg.pro
index 91e74353ac..0735876b2c 100644
--- a/examples/openvg/openvg.pro
+++ b/examples/openvg/openvg.pro
@@ -7,3 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS openvg.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/openvg
INSTALLS += target sources
QT += widgets
+
diff --git a/examples/painting/basicdrawing/basicdrawing.desktop b/examples/painting/basicdrawing/basicdrawing.desktop
new file mode 100644
index 0000000000..7f178ec8a7
--- /dev/null
+++ b/examples/painting/basicdrawing/basicdrawing.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Basic Drawing
+Exec=/opt/usr/bin/basicdrawing
+Icon=basicdrawing
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/basicdrawing/basicdrawing.pro b/examples/painting/basicdrawing/basicdrawing.pro
index 27eb0b3f55..d0f6192fbc 100644
--- a/examples/painting/basicdrawing/basicdrawing.pro
+++ b/examples/painting/basicdrawing/basicdrawing.pro
@@ -16,3 +16,6 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/painting/basicdrawing/main.cpp b/examples/painting/basicdrawing/main.cpp
index 6662742166..aa839f68cc 100644
--- a/examples/painting/basicdrawing/main.cpp
+++ b/examples/painting/basicdrawing/main.cpp
@@ -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();
}
diff --git a/examples/painting/basicdrawing/window.cpp b/examples/painting/basicdrawing/window.cpp
index 2bb7c63493..6f750c45d1 100644
--- a/examples/painting/basicdrawing/window.cpp
+++ b/examples/painting/basicdrawing/window.cpp
@@ -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();
diff --git a/examples/painting/concentriccircles/concentriccircles.desktop b/examples/painting/concentriccircles/concentriccircles.desktop
new file mode 100644
index 0000000000..7007f192bc
--- /dev/null
+++ b/examples/painting/concentriccircles/concentriccircles.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Concentric Circles
+Exec=/opt/usr/bin/concentriccircles
+Icon=concentriccircles
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/concentriccircles/concentriccircles.pro b/examples/painting/concentriccircles/concentriccircles.pro
index cc141d0706..d5d60a9f49 100644
--- a/examples/painting/concentriccircles/concentriccircles.pro
+++ b/examples/painting/concentriccircles/concentriccircles.pro
@@ -15,3 +15,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/painting/concentriccircles/main.cpp b/examples/painting/concentriccircles/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/painting/concentriccircles/main.cpp
+++ b/examples/painting/concentriccircles/main.cpp
@@ -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();
}
diff --git a/examples/painting/fontsampler/fontsampler.desktop b/examples/painting/fontsampler/fontsampler.desktop
new file mode 100644
index 0000000000..8582891fcf
--- /dev/null
+++ b/examples/painting/fontsampler/fontsampler.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Font Sampler
+Exec=/opt/usr/bin/fontsampler
+Icon=fontsampler
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/fontsampler/fontsampler.pro b/examples/painting/fontsampler/fontsampler.pro
index a7c8b02853..69960cd68e 100644
--- a/examples/painting/fontsampler/fontsampler.pro
+++ b/examples/painting/fontsampler/fontsampler.pro
@@ -11,3 +11,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/painting/fontsampler/main.cpp b/examples/painting/fontsampler/main.cpp
index 01c8adae53..dffe80348a 100644
--- a/examples/painting/fontsampler/main.cpp
+++ b/examples/painting/fontsampler/main.cpp
@@ -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();
}
diff --git a/examples/painting/fontsampler/mainwindow.cpp b/examples/painting/fontsampler/mainwindow.cpp
index 27e8169f61..21babaf8d2 100644
--- a/examples/painting/fontsampler/mainwindow.cpp
+++ b/examples/painting/fontsampler/mainwindow.cpp
@@ -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
diff --git a/examples/painting/fontsampler/mainwindow.h b/examples/painting/fontsampler/mainwindow.h
index 7ea4cd5ed0..4021ee7c6c 100644
--- a/examples/painting/fontsampler/mainwindow.h
+++ b/examples/painting/fontsampler/mainwindow.h
@@ -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);
diff --git a/examples/painting/fontsampler/mainwindowbase.ui b/examples/painting/fontsampler/mainwindowbase.ui
index 6545b34083..1a95ebd6d1 100644
--- a/examples/painting/fontsampler/mainwindowbase.ui
+++ b/examples/painting/fontsampler/mainwindowbase.ui
@@ -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>
@@ -12,129 +10,133 @@
<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>
diff --git a/examples/painting/imagecomposition/imagecomposer.cpp b/examples/painting/imagecomposition/imagecomposer.cpp
index 6410b30062..e0173ff6d6 100644
--- a/examples/painting/imagecomposition/imagecomposer.cpp
+++ b/examples/painting/imagecomposition/imagecomposer.cpp
@@ -43,7 +43,11 @@
#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);
diff --git a/examples/painting/imagecomposition/imagecomposition.desktop b/examples/painting/imagecomposition/imagecomposition.desktop
new file mode 100644
index 0000000000..854fc862f0
--- /dev/null
+++ b/examples/painting/imagecomposition/imagecomposition.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Image Composition
+Exec=/opt/usr/bin/imagecomposition
+Icon=imagecomposition
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/imagecomposition/imagecomposition.pro b/examples/painting/imagecomposition/imagecomposition.pro
index dcb8b22f48..d0b666764d 100644
--- a/examples/painting/imagecomposition/imagecomposition.pro
+++ b/examples/painting/imagecomposition/imagecomposition.pro
@@ -14,3 +14,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/painting/imagecomposition/main.cpp b/examples/painting/imagecomposition/main.cpp
index e70fa5fae9..f97a3ff7ef 100644
--- a/examples/painting/imagecomposition/main.cpp
+++ b/examples/painting/imagecomposition/main.cpp
@@ -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]
diff --git a/examples/painting/painterpaths/main.cpp b/examples/painting/painterpaths/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/painting/painterpaths/main.cpp
+++ b/examples/painting/painterpaths/main.cpp
@@ -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();
}
diff --git a/examples/painting/painterpaths/painterpaths.desktop b/examples/painting/painterpaths/painterpaths.desktop
new file mode 100644
index 0000000000..ae92f2c589
--- /dev/null
+++ b/examples/painting/painterpaths/painterpaths.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Painter Paths
+Exec=/opt/usr/bin/painterpaths
+Icon=painterpaths
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/painterpaths/painterpaths.pro b/examples/painting/painterpaths/painterpaths.pro
index e8fd7accd6..c9c07f8110 100644
--- a/examples/painting/painterpaths/painterpaths.pro
+++ b/examples/painting/painterpaths/painterpaths.pro
@@ -16,3 +16,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/painting/painterpaths/window.cpp b/examples/painting/painterpaths/window.cpp
index 2c3c0225c7..1139ad0258 100644
--- a/examples/painting/painterpaths/window.cpp
+++ b/examples/painting/painterpaths/window.cpp
@@ -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]
diff --git a/examples/painting/painterpaths/window.h b/examples/painting/painterpaths/window.h
index 4891fdd153..b95cd93851 100644
--- a/examples/painting/painterpaths/window.h
+++ b/examples/painting/painterpaths/window.h
@@ -71,9 +71,7 @@ private:
//! [1]
//! [2]
- enum { NumRenderAreas = 9 };
-
- RenderArea *renderAreas[NumRenderAreas];
+ QList<RenderArea*> renderAreas;
QLabel *fillRuleLabel;
QLabel *fillGradientLabel;
QLabel *fillToLabel;
diff --git a/examples/painting/painting.pro b/examples/painting/painting.pro
index 72ea1c36ae..68d4d73b62 100644
--- a/examples/painting/painting.pro
+++ b/examples/painting/painting.pro
@@ -3,9 +3,8 @@ SUBDIRS = basicdrawing \
concentriccircles \
imagecomposition \
painterpaths \
- transformations
-
-!wince*:!symbian: SUBDIRS += fontsampler
+ transformations \
+ fontsampler
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/painting
@@ -15,3 +14,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/painting/svggenerator/svggenerator.desktop b/examples/painting/svggenerator/svggenerator.desktop
new file mode 100644
index 0000000000..3ae32a4908
--- /dev/null
+++ b/examples/painting/svggenerator/svggenerator.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=SVG Generator
+Exec=/opt/usr/bin/svggenerator
+Icon=svggenerator
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/svgviewer/svgviewer.desktop b/examples/painting/svgviewer/svgviewer.desktop
new file mode 100644
index 0000000000..477ef789d8
--- /dev/null
+++ b/examples/painting/svgviewer/svgviewer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=SVG Viewer
+Exec=/opt/usr/bin/svgviewer
+Icon=svgviewer
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/transformations/main.cpp b/examples/painting/transformations/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/painting/transformations/main.cpp
+++ b/examples/painting/transformations/main.cpp
@@ -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();
}
diff --git a/examples/painting/transformations/transformations.desktop b/examples/painting/transformations/transformations.desktop
new file mode 100644
index 0000000000..2f53891069
--- /dev/null
+++ b/examples/painting/transformations/transformations.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Transformations
+Exec=/opt/usr/bin/transformations
+Icon=transformations
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/painting/transformations/transformations.pro b/examples/painting/transformations/transformations.pro
index 10515e0df6..171dd714ea 100644
--- a/examples/painting/transformations/transformations.pro
+++ b/examples/painting/transformations/transformations.pro
@@ -15,3 +15,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.desktop b/examples/qtconcurrent/imagescaling/imagescaling.desktop
new file mode 100644
index 0000000000..289f56c51d
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/imagescaling.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QtConcurrent Image Scaling
+Exec=/opt/usr/bin/imagescaling
+Icon=imagescaling
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtconcurrent/imagescaling/imagescaling.pro b/examples/qtconcurrent/imagescaling/imagescaling.pro
index 2f3f1e6ceb..d214949230 100644
--- a/examples/qtconcurrent/imagescaling/imagescaling.pro
+++ b/examples/qtconcurrent/imagescaling/imagescaling.pro
@@ -16,3 +16,6 @@ symbian: CONFIG += qt_example
wince*: DEPLOYMENT_PLUGIN += qgif qjpeg qtiff
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/imagescaling/main.cpp b/examples/qtconcurrent/imagescaling/main.cpp
index 08d66a0f4f..963422fcb7 100644
--- a/examples/qtconcurrent/imagescaling/main.cpp
+++ b/examples/qtconcurrent/imagescaling/main.cpp
@@ -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
diff --git a/examples/qtconcurrent/map/main.cpp b/examples/qtconcurrent/map/main.cpp
index bb6c5c657a..76b14476f3 100644
--- a/examples/qtconcurrent/map/main.cpp
+++ b/examples/qtconcurrent/map/main.cpp
@@ -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
diff --git a/examples/qtconcurrent/map/map.desktop b/examples/qtconcurrent/map/map.desktop
new file mode 100644
index 0000000000..7d8bba9e4b
--- /dev/null
+++ b/examples/qtconcurrent/map/map.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QtConcurrent Map
+Exec=/opt/usr/bin/map
+Icon=map
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro
index ab41b67008..b5976d6273 100644
--- a/examples/qtconcurrent/map/map.pro
+++ b/examples/qtconcurrent/map/map.pro
@@ -15,3 +15,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/progressdialog/main.cpp b/examples/qtconcurrent/progressdialog/main.cpp
index 1167c45d6b..8473d05716 100644
--- a/examples/qtconcurrent/progressdialog/main.cpp
+++ b/examples/qtconcurrent/progressdialog/main.cpp
@@ -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
diff --git a/examples/qtconcurrent/progressdialog/progressdialog.desktop b/examples/qtconcurrent/progressdialog/progressdialog.desktop
new file mode 100644
index 0000000000..5179471236
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/progressdialog.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QtConcurrent Progress Dialog
+Exec=/opt/usr/bin/progressdialog
+Icon=progressdialog
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtconcurrent/progressdialog/progressdialog.pro b/examples/qtconcurrent/progressdialog/progressdialog.pro
index 9fa84fcbff..506a572aa3 100644
--- a/examples/qtconcurrent/progressdialog/progressdialog.pro
+++ b/examples/qtconcurrent/progressdialog/progressdialog.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
@@ -15,3 +14,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/qtconcurrent.pro b/examples/qtconcurrent/qtconcurrent.pro
index 5be088e86d..a1594a26a9 100644
--- a/examples/qtconcurrent/qtconcurrent.pro
+++ b/examples/qtconcurrent/qtconcurrent.pro
@@ -16,3 +16,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/qtconcurrent/runfunction/main.cpp b/examples/qtconcurrent/runfunction/main.cpp
index 1e448bb71d..86fdf80aa4 100644
--- a/examples/qtconcurrent/runfunction/main.cpp
+++ b/examples/qtconcurrent/runfunction/main.cpp
@@ -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
diff --git a/examples/qtconcurrent/runfunction/runfunction.desktop b/examples/qtconcurrent/runfunction/runfunction.desktop
new file mode 100644
index 0000000000..0c36f89586
--- /dev/null
+++ b/examples/qtconcurrent/runfunction/runfunction.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QtConcurrent Run Function
+Exec=/opt/usr/bin/runfunction
+Icon=runfunction
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro
index d100aa86a9..80495e1db2 100644
--- a/examples/qtconcurrent/runfunction/runfunction.pro
+++ b/examples/qtconcurrent/runfunction/runfunction.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
@@ -15,3 +14,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtconcurrent/wordcount/main.cpp b/examples/qtconcurrent/wordcount/main.cpp
index 035207c410..56be795c60 100644
--- a/examples/qtconcurrent/wordcount/main.cpp
+++ b/examples/qtconcurrent/wordcount/main.cpp
@@ -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
diff --git a/examples/qtconcurrent/wordcount/wordcount.desktop b/examples/qtconcurrent/wordcount/wordcount.desktop
new file mode 100644
index 0000000000..382d573583
--- /dev/null
+++ b/examples/qtconcurrent/wordcount/wordcount.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QtConcurrent Word Count
+Exec=/opt/usr/bin/wordcount
+Icon=wordcount
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro
index 2866e807a1..2980792da1 100644
--- a/examples/qtconcurrent/wordcount/wordcount.pro
+++ b/examples/qtconcurrent/wordcount/wordcount.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-TARGET +=
DEPENDPATH += .
INCLUDEPATH += .
@@ -15,3 +14,6 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/qtestlib/qtestlib.pro b/examples/qtestlib/qtestlib.pro
index 3118e391ce..025c2b5b9e 100644
--- a/examples/qtestlib/qtestlib.pro
+++ b/examples/qtestlib/qtestlib.pro
@@ -9,3 +9,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/qtestlib/tutorial1/tutorial1.desktop b/examples/qtestlib/tutorial1/tutorial1.desktop
new file mode 100644
index 0000000000..4b0b5850f7
--- /dev/null
+++ b/examples/qtestlib/tutorial1/tutorial1.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Writing a Unit Test
+Exec=/opt/usr/bin/tutorial1
+Icon=tutorial1
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtestlib/tutorial1/tutorial1.pro b/examples/qtestlib/tutorial1/tutorial1.pro
index dd5820f49c..2a9d032dd5 100644
--- a/examples/qtestlib/tutorial1/tutorial1.pro
+++ b/examples/qtestlib/tutorial1/tutorial1.pro
@@ -12,3 +12,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/qtestlib/tutorial2/tutorial2.desktop b/examples/qtestlib/tutorial2/tutorial2.desktop
new file mode 100644
index 0000000000..df8e7817a1
--- /dev/null
+++ b/examples/qtestlib/tutorial2/tutorial2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Data Driven Testing
+Exec=/opt/usr/bin/tutorial2
+Icon=tutorial2
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtestlib/tutorial2/tutorial2.pro b/examples/qtestlib/tutorial2/tutorial2.pro
index a1798c56ae..b459d25b97 100644
--- a/examples/qtestlib/tutorial2/tutorial2.pro
+++ b/examples/qtestlib/tutorial2/tutorial2.pro
@@ -12,3 +12,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/qtestlib/tutorial3/tutorial3.desktop b/examples/qtestlib/tutorial3/tutorial3.desktop
new file mode 100644
index 0000000000..0522ca5f53
--- /dev/null
+++ b/examples/qtestlib/tutorial3/tutorial3.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Simulating GUI Events
+Exec=/opt/usr/bin/tutorial3
+Icon=tutorial3
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtestlib/tutorial3/tutorial3.pro b/examples/qtestlib/tutorial3/tutorial3.pro
index 6dbfed961c..4985858d3d 100644
--- a/examples/qtestlib/tutorial3/tutorial3.pro
+++ b/examples/qtestlib/tutorial3/tutorial3.pro
@@ -12,3 +12,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/qtestlib/tutorial4/tutorial4.desktop b/examples/qtestlib/tutorial4/tutorial4.desktop
new file mode 100644
index 0000000000..05b5678009
--- /dev/null
+++ b/examples/qtestlib/tutorial4/tutorial4.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Replaying GUI Events
+Exec=/opt/usr/bin/tutorial4
+Icon=tutorial4
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtestlib/tutorial4/tutorial4.pro b/examples/qtestlib/tutorial4/tutorial4.pro
index e0a8895b19..02d9020b84 100644
--- a/examples/qtestlib/tutorial4/tutorial4.pro
+++ b/examples/qtestlib/tutorial4/tutorial4.pro
@@ -12,3 +12,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/qtestlib/tutorial5/tutorial5.desktop b/examples/qtestlib/tutorial5/tutorial5.desktop
new file mode 100644
index 0000000000..9e8e6cf609
--- /dev/null
+++ b/examples/qtestlib/tutorial5/tutorial5.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Writing a Benchmark
+Exec=/opt/usr/bin/tutorial5
+Icon=tutorial5
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qtestlib/tutorial5/tutorial5.pro b/examples/qtestlib/tutorial5/tutorial5.pro
index 2399df2919..efdb1ce055 100644
--- a/examples/qtestlib/tutorial5/tutorial5.pro
+++ b/examples/qtestlib/tutorial5/tutorial5.pro
@@ -12,3 +12,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/qws/dbscreen/dbscreen.desktop b/examples/qws/dbscreen/dbscreen.desktop
new file mode 100644
index 0000000000..1726e6cb8d
--- /dev/null
+++ b/examples/qws/dbscreen/dbscreen.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Double Buffered Graphics Driver
+Exec=/opt/usr/bin/dbscreen
+Icon=dbscreen
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qws/dbscreen/dbscreen.pro b/examples/qws/dbscreen/dbscreen.pro
index 3b8471943e..a8f754d217 100644
--- a/examples/qws/dbscreen/dbscreen.pro
+++ b/examples/qws/dbscreen/dbscreen.pro
@@ -10,3 +10,7 @@ SOURCES = dbscreendriverplugin.cpp \
dbscreen.cpp
QT += widgets
+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)
diff --git a/examples/qws/framebuffer/framebuffer.desktop b/examples/qws/framebuffer/framebuffer.desktop
new file mode 100644
index 0000000000..030f264cad
--- /dev/null
+++ b/examples/qws/framebuffer/framebuffer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Linux Framebuffer
+Exec=/opt/usr/bin/framebuffer
+Icon=framebuffer
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qws/framebuffer/framebuffer.pro b/examples/qws/framebuffer/framebuffer.pro
index 5f703ade9d..52da5594df 100644
--- a/examples/qws/framebuffer/framebuffer.pro
+++ b/examples/qws/framebuffer/framebuffer.pro
@@ -10,3 +10,9 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS framebuffer.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/framebuffer
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/qws/mousecalibration/mousecalibration.desktop b/examples/qws/mousecalibration/mousecalibration.desktop
new file mode 100644
index 0000000000..07c231e97c
--- /dev/null
+++ b/examples/qws/mousecalibration/mousecalibration.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Mouse Calibration
+Exec=/opt/usr/bin/mousecalibration
+Icon=mousecalibration
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qws/mousecalibration/mousecalibration.pro b/examples/qws/mousecalibration/mousecalibration.pro
index 66e7881e63..9c767233c6 100644
--- a/examples/qws/mousecalibration/mousecalibration.pro
+++ b/examples/qws/mousecalibration/mousecalibration.pro
@@ -10,3 +10,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/mousecalibration
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/qws/simpledecoration/simpledecoration.desktop b/examples/qws/simpledecoration/simpledecoration.desktop
new file mode 100644
index 0000000000..9cd588eb1d
--- /dev/null
+++ b/examples/qws/simpledecoration/simpledecoration.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Simple Decoration
+Exec=/opt/usr/bin/simpledecoration
+Icon=simpledecoration
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qws/simpledecoration/simpledecoration.pro b/examples/qws/simpledecoration/simpledecoration.pro
index 0f24844497..14b4d8fef9 100644
--- a/examples/qws/simpledecoration/simpledecoration.pro
+++ b/examples/qws/simpledecoration/simpledecoration.pro
@@ -11,3 +11,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/qws/simpledecoration
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/qws/svgalib/svgalib.desktop b/examples/qws/svgalib/svgalib.desktop
new file mode 100644
index 0000000000..94ea92fd52
--- /dev/null
+++ b/examples/qws/svgalib/svgalib.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Accelerated Graphics Driver
+Exec=/opt/usr/bin/svgalib
+Icon=svgalib
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/qws/svgalib/svgalib.pro b/examples/qws/svgalib/svgalib.pro
index f3aff9d0da..2d99774707 100644
--- a/examples/qws/svgalib/svgalib.pro
+++ b/examples/qws/svgalib/svgalib.pro
@@ -18,3 +18,9 @@ SOURCES = svgalibscreen.cpp \
svgalibplugin.cpp
QT += widgets
+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)
diff --git a/examples/richtext/calendar/calendar.desktop b/examples/richtext/calendar/calendar.desktop
new file mode 100644
index 0000000000..41ba6dd95a
--- /dev/null
+++ b/examples/richtext/calendar/calendar.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Calendar
+Exec=/opt/usr/bin/calendar
+Icon=calendar
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/richtext/calendar/calendar.pro b/examples/richtext/calendar/calendar.pro
index 17ac2bb158..265e0e94f6 100644
--- a/examples/richtext/calendar/calendar.pro
+++ b/examples/richtext/calendar/calendar.pro
@@ -2,6 +2,9 @@ HEADERS = mainwindow.h
SOURCES = main.cpp \
mainwindow.cpp
+# App cannot be with name "calendar" in Symbian due to same named system component.
+symbian: TARGET = calendarapp
+
# install
target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/richtext/calendar
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS calendar.pro
@@ -10,3 +13,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/richtext/calendar/main.cpp b/examples/richtext/calendar/main.cpp
index 808f72480b..fa94aa3ff2 100644
--- a/examples/richtext/calendar/main.cpp
+++ b/examples/richtext/calendar/main.cpp
@@ -46,7 +46,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow window;
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ window.show();
+#else
window.resize(640, 256);
window.show();
+#endif
return app.exec();
}
diff --git a/examples/richtext/calendar/mainwindow.cpp b/examples/richtext/calendar/mainwindow.cpp
index 58d9b55c79..ff65b7e890 100644
--- a/examples/richtext/calendar/mainwindow.cpp
+++ b/examples/richtext/calendar/mainwindow.cpp
@@ -70,7 +70,6 @@ MainWindow::MainWindow()
QLabel *fontSizeLabel = new QLabel(tr("Font size:"));
QSpinBox *fontSizeSpinBox = new QSpinBox;
fontSizeSpinBox->setRange(1, 64);
- fontSizeSpinBox->setValue(10);
editor = new QTextBrowser;
insertCalendar();
@@ -83,6 +82,12 @@ MainWindow::MainWindow()
this, SLOT(setFontSize(int)));
//! [3]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+ fontSizeSpinBox->setValue(4);
+#else
+ fontSizeSpinBox->setValue(10);
+#endif
+
//! [4]
QHBoxLayout *controlsLayout = new QHBoxLayout;
controlsLayout->addWidget(dateLabel);
diff --git a/examples/richtext/orderform/detailsdialog.cpp b/examples/richtext/orderform/detailsdialog.cpp
index ba395ec2bb..8f54bb2615 100644
--- a/examples/richtext/orderform/detailsdialog.cpp
+++ b/examples/richtext/orderform/detailsdialog.cpp
@@ -53,8 +53,13 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent)
nameEdit = new QLineEdit;
addressEdit = new QTextEdit;
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_SIMULATOR)
+ offersCheckBox = new QCheckBox(tr("Send information about\n"
+ "products and special offers"));
+#else
offersCheckBox = new QCheckBox(tr("Send information about products and "
"special offers"));
+#endif
setupItemsTable();
@@ -66,6 +71,30 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent)
//! [0]
//! [1]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ QWidget *widgetSubscriber = new QWidget;
+ QGridLayout *subscriberLayout = new QGridLayout;
+ subscriberLayout->addWidget(nameLabel, 0, 0);
+ subscriberLayout->addWidget(nameEdit, 0, 1);
+ subscriberLayout->addWidget(addressLabel, 1, 0);
+ subscriberLayout->addWidget(addressEdit, 1, 1);
+ subscriberLayout->addWidget(offersCheckBox, 2, 0, 1, 2);
+ widgetSubscriber->setLayout(subscriberLayout);
+
+ QWidget *widgetOrder = new QWidget;
+ QVBoxLayout *orderLayout = new QVBoxLayout;
+ orderLayout->addWidget(itemsTable);
+ widgetOrder->setLayout(orderLayout);
+
+ QTabWidget *tabWidget = new QTabWidget;
+ tabWidget->addTab(widgetSubscriber, "Subscriber");
+ tabWidget->addTab(widgetOrder, "Order");
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(tabWidget);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+#else
QGridLayout *mainLayout = new QGridLayout;
mainLayout->addWidget(nameLabel, 0, 0);
mainLayout->addWidget(nameEdit, 0, 1);
@@ -75,6 +104,7 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent)
mainLayout->addWidget(offersCheckBox, 2, 1, 1, 2);
mainLayout->addWidget(buttonBox, 3, 0, 1, 3);
setLayout(mainLayout);
+#endif
setWindowTitle(title);
}
diff --git a/examples/richtext/orderform/main.cpp b/examples/richtext/orderform/main.cpp
index eb8155fd9a..7aff81d6ad 100644
--- a/examples/richtext/orderform/main.cpp
+++ b/examples/richtext/orderform/main.cpp
@@ -47,8 +47,14 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow window;
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ windows.show();
+#else
window.resize(640, 480);
window.show();
+#endif
window.createSample();
return app.exec();
}
diff --git a/examples/richtext/orderform/orderform.desktop b/examples/richtext/orderform/orderform.desktop
new file mode 100644
index 0000000000..4690cbc876
--- /dev/null
+++ b/examples/richtext/orderform/orderform.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Order Form
+Exec=/opt/usr/bin/orderform
+Icon=orderform
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/richtext/orderform/orderform.pro b/examples/richtext/orderform/orderform.pro
index 99697e5815..4ba2ecf203 100644
--- a/examples/richtext/orderform/orderform.pro
+++ b/examples/richtext/orderform/orderform.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/richtext/richtext.pro b/examples/richtext/richtext.pro
index 4b82baf956..e60e9c345e 100644
--- a/examples/richtext/richtext.pro
+++ b/examples/richtext/richtext.pro
@@ -11,3 +11,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/richtext/syntaxhighlighter/main.cpp b/examples/richtext/syntaxhighlighter/main.cpp
index eecfb12bdc..e0e5e4f407 100644
--- a/examples/richtext/syntaxhighlighter/main.cpp
+++ b/examples/richtext/syntaxhighlighter/main.cpp
@@ -46,7 +46,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow window;
+#if defined(Q_OS_SYMBIAN)
+ window.showMaximized();
+#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ window.show();
+#else
window.resize(640, 512);
window.show();
+#endif
return app.exec();
}
diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.desktop b/examples/richtext/syntaxhighlighter/syntaxhighlighter.desktop
new file mode 100644
index 0000000000..2e3c833f0e
--- /dev/null
+++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Syntax Highlighter
+Exec=/opt/usr/bin/syntaxhighlighter
+Icon=syntaxhighlighter
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
index 4f44782318..e2c4abb6af 100644
--- a/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
+++ b/examples/richtext/syntaxhighlighter/syntaxhighlighter.pro
@@ -18,3 +18,5 @@ wince*: {
DEPLOYMENT += addFiles
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/sql/cachedtable/cachedtable.desktop b/examples/sql/cachedtable/cachedtable.desktop
new file mode 100644
index 0000000000..aeec353e69
--- /dev/null
+++ b/examples/sql/cachedtable/cachedtable.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Cached Table
+Exec=/opt/usr/bin/cachedtable
+Icon=cachedtable
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/cachedtable/cachedtable.pro b/examples/sql/cachedtable/cachedtable.pro
index 8df9313761..9b89a910d8 100644
--- a/examples/sql/cachedtable/cachedtable.pro
+++ b/examples/sql/cachedtable/cachedtable.pro
@@ -11,3 +11,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/cachedtable
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/sql/cachedtable/main.cpp b/examples/sql/cachedtable/main.cpp
index 26ddc42c54..ecbf565bab 100644
--- a/examples/sql/cachedtable/main.cpp
+++ b/examples/sql/cachedtable/main.cpp
@@ -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]
diff --git a/examples/sql/cachedtable/tableeditor.cpp b/examples/sql/cachedtable/tableeditor.cpp
index 02de4beb7a..4f90de12e5 100644
--- a/examples/sql/cachedtable/tableeditor.cpp
+++ b/examples/sql/cachedtable/tableeditor.cpp
@@ -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]
diff --git a/examples/sql/cachedtable/tableeditor.h b/examples/sql/cachedtable/tableeditor.h
index 14d9986c63..f13bd3d5bf 100644
--- a/examples/sql/cachedtable/tableeditor.h
+++ b/examples/sql/cachedtable/tableeditor.h
@@ -50,7 +50,7 @@ class QSqlTableModel;
QT_END_NAMESPACE
//! [0]
-class TableEditor : public QDialog
+class TableEditor : public QWidget
{
Q_OBJECT
diff --git a/examples/sql/drilldown/drilldown.desktop b/examples/sql/drilldown/drilldown.desktop
new file mode 100644
index 0000000000..b0f3ce0a9c
--- /dev/null
+++ b/examples/sql/drilldown/drilldown.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Drill Down
+Exec=/opt/usr/bin/drilldown
+Icon=drilldown
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/drilldown/drilldown.pro b/examples/sql/drilldown/drilldown.pro
index 67eb8bef95..f3050beb2f 100644
--- a/examples/sql/drilldown/drilldown.pro
+++ b/examples/sql/drilldown/drilldown.pro
@@ -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)
diff --git a/examples/sql/drilldown/informationwindow.cpp b/examples/sql/drilldown/informationwindow.cpp
index 3f43a5901f..351b98dd0f 100644
--- a/examples/sql/drilldown/informationwindow.cpp
+++ b/examples/sql/drilldown/informationwindow.cpp
@@ -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()));
}
diff --git a/examples/sql/drilldown/main.cpp b/examples/sql/drilldown/main.cpp
index d139089dc3..462eb0face 100644
--- a/examples/sql/drilldown/main.cpp
+++ b/examples/sql/drilldown/main.cpp
@@ -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);
diff --git a/examples/sql/drilldown/view.cpp b/examples/sql/drilldown/view.cpp
index 68fe06a8e2..883b28b094 100644
--- a/examples/sql/drilldown/view.cpp
+++ b/examples/sql/drilldown/view.cpp
@@ -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
diff --git a/examples/sql/masterdetail/main.cpp b/examples/sql/masterdetail/main.cpp
index 0e2aca5d2e..582910873f 100644
--- a/examples/sql/masterdetail/main.cpp
+++ b/examples/sql/masterdetail/main.cpp
@@ -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();
}
diff --git a/examples/sql/masterdetail/mainwindow.cpp b/examples/sql/masterdetail/mainwindow.cpp
index d00946cb39..77b869e17c 100644
--- a/examples/sql/masterdetail/mainwindow.cpp
+++ b/examples/sql/masterdetail/mainwindow.cpp
@@ -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"));
}
diff --git a/examples/sql/masterdetail/masterdetail.desktop b/examples/sql/masterdetail/masterdetail.desktop
new file mode 100644
index 0000000000..6f8c3e5acd
--- /dev/null
+++ b/examples/sql/masterdetail/masterdetail.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Master Detail
+Exec=/opt/usr/bin/masterdetail
+Icon=masterdetail
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/masterdetail/masterdetail.pro b/examples/sql/masterdetail/masterdetail.pro
index d320e85f87..ef8f88d131 100644
--- a/examples/sql/masterdetail/masterdetail.pro
+++ b/examples/sql/masterdetail/masterdetail.pro
@@ -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)
diff --git a/examples/sql/querymodel/main.cpp b/examples/sql/querymodel/main.cpp
index be2a4156ac..d001fda866 100644
--- a/examples/sql/querymodel/main.cpp
+++ b/examples/sql/querymodel/main.cpp
@@ -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();
}
diff --git a/examples/sql/querymodel/querymodel.desktop b/examples/sql/querymodel/querymodel.desktop
new file mode 100644
index 0000000000..8bba971814
--- /dev/null
+++ b/examples/sql/querymodel/querymodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Query Model
+Exec=/opt/usr/bin/querymodel
+Icon=querymodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/querymodel/querymodel.pro b/examples/sql/querymodel/querymodel.pro
index 32fb8c091b..8e3db2a768 100644
--- a/examples/sql/querymodel/querymodel.pro
+++ b/examples/sql/querymodel/querymodel.pro
@@ -13,3 +13,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/querymodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.cpp b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
index 41dbdd2890..3d8d106ed9 100644
--- a/examples/sql/relationaltablemodel/relationaltablemodel.cpp
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.cpp
@@ -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();
}
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.desktop b/examples/sql/relationaltablemodel/relationaltablemodel.desktop
new file mode 100644
index 0000000000..8d5437d30c
--- /dev/null
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Relational Table Model
+Exec=/opt/usr/bin/relationaltablemodel
+Icon=relationaltablemodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/relationaltablemodel/relationaltablemodel.pro b/examples/sql/relationaltablemodel/relationaltablemodel.pro
index ce8bb00152..a8bc4fc7a0 100644
--- a/examples/sql/relationaltablemodel/relationaltablemodel.pro
+++ b/examples/sql/relationaltablemodel/relationaltablemodel.pro
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/relationaltablemodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro
index 047f733fac..9c2829d776 100644
--- a/examples/sql/sql.pro
+++ b/examples/sql/sql.pro
@@ -19,3 +19,4 @@ INSTALLS += sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/sql/sqlwidgetmapper/main.cpp b/examples/sql/sqlwidgetmapper/main.cpp
index 41e756d8ad..9e45edefac 100644
--- a/examples/sql/sqlwidgetmapper/main.cpp
+++ b/examples/sql/sqlwidgetmapper/main.cpp
@@ -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();
}
diff --git a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.desktop b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.desktop
new file mode 100644
index 0000000000..c02e6bcb16
--- /dev/null
+++ b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=SQL Widget Mapper
+Exec=/opt/usr/bin/sqlwidgetmapper
+Icon=sqlwidgetmapper
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
index 26bf70ad97..63acd8269e 100644
--- a/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
+++ b/examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro
@@ -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)
+
diff --git a/examples/sql/tablemodel/tablemodel.cpp b/examples/sql/tablemodel/tablemodel.cpp
index 23cf00bb97..e1a11d140f 100644
--- a/examples/sql/tablemodel/tablemodel.cpp
+++ b/examples/sql/tablemodel/tablemodel.cpp
@@ -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();
}
diff --git a/examples/sql/tablemodel/tablemodel.desktop b/examples/sql/tablemodel/tablemodel.desktop
new file mode 100644
index 0000000000..821fbd996f
--- /dev/null
+++ b/examples/sql/tablemodel/tablemodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Table Model
+Exec=/opt/usr/bin/tablemodel
+Icon=tablemodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/sql/tablemodel/tablemodel.pro b/examples/sql/tablemodel/tablemodel.pro
index 56567235db..b59507db07 100644
--- a/examples/sql/tablemodel/tablemodel.pro
+++ b/examples/sql/tablemodel/tablemodel.pro
@@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/tablemodel
INSTALLS += target sources
symbian: CONFIG += qt_example
+maemo5: CONFIG += qt_example
diff --git a/examples/statemachine/eventtransitions/eventtransitions.desktop b/examples/statemachine/eventtransitions/eventtransitions.desktop
new file mode 100644
index 0000000000..c1bceb2240
--- /dev/null
+++ b/examples/statemachine/eventtransitions/eventtransitions.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Event Transitions
+Exec=/opt/usr/bin/eventtransitions
+Icon=eventtransitions
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/eventtransitions/eventtransitions.pro b/examples/statemachine/eventtransitions/eventtransitions.pro
index 1cd958ae97..a958ed7819 100644
--- a/examples/statemachine/eventtransitions/eventtransitions.pro
+++ b/examples/statemachine/eventtransitions/eventtransitions.pro
@@ -6,3 +6,8 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS eventtransitions.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/eventtransitions
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/statemachine/eventtransitions/main.cpp b/examples/statemachine/eventtransitions/main.cpp
index 1b84ae020c..291c1d441d 100644
--- a/examples/statemachine/eventtransitions/main.cpp
+++ b/examples/statemachine/eventtransitions/main.cpp
@@ -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();
}
diff --git a/examples/statemachine/factorial/factorial.desktop b/examples/statemachine/factorial/factorial.desktop
new file mode 100644
index 0000000000..41b27227f9
--- /dev/null
+++ b/examples/statemachine/factorial/factorial.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Factorial States
+Exec=/opt/usr/bin/factorial
+Icon=factorial
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/factorial/factorial.pro b/examples/statemachine/factorial/factorial.pro
index 4291d43306..012e175e3b 100644
--- a/examples/statemachine/factorial/factorial.pro
+++ b/examples/statemachine/factorial/factorial.pro
@@ -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)
diff --git a/examples/statemachine/pingpong/pingpong.desktop b/examples/statemachine/pingpong/pingpong.desktop
new file mode 100644
index 0000000000..79646a2cc8
--- /dev/null
+++ b/examples/statemachine/pingpong/pingpong.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Ping Pong States
+Exec=/opt/usr/bin/pingpong
+Icon=pingpong
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/pingpong/pingpong.pro b/examples/statemachine/pingpong/pingpong.pro
index 9d2b17fc9e..9ee782c1de 100644
--- a/examples/statemachine/pingpong/pingpong.pro
+++ b/examples/statemachine/pingpong/pingpong.pro
@@ -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)
diff --git a/examples/statemachine/rogue/main.cpp b/examples/statemachine/rogue/main.cpp
index b52b55fccf..2939e4a7c5 100644
--- a/examples/statemachine/rogue/main.cpp
+++ b/examples/statemachine/rogue/main.cpp
@@ -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();
}
diff --git a/examples/statemachine/rogue/movementtransition.h b/examples/statemachine/rogue/movementtransition.h
index d125a862b6..f2dcde3375 100644
--- a/examples/statemachine/rogue/movementtransition.h
+++ b/examples/statemachine/rogue/movementtransition.h
@@ -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;
diff --git a/examples/statemachine/rogue/rogue.desktop b/examples/statemachine/rogue/rogue.desktop
new file mode 100644
index 0000000000..71ca4b6511
--- /dev/null
+++ b/examples/statemachine/rogue/rogue.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Rogue
+Exec=/opt/usr/bin/rogue
+Icon=rogue
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/rogue/rogue.pro b/examples/statemachine/rogue/rogue.pro
index d653beb2d0..9e401aab82 100644
--- a/examples/statemachine/rogue/rogue.pro
+++ b/examples/statemachine/rogue/rogue.pro
@@ -10,3 +10,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/rogue
INSTALLS += target sources
QT += widgets
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/statemachine/rogue/window.cpp b/examples/statemachine/rogue/window.cpp
index 2700a87754..fa62362ecc 100644
--- a/examples/statemachine/rogue/window.cpp
+++ b/examples/statemachine/rogue/window.cpp
@@ -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]
diff --git a/examples/statemachine/rogue/window.h b/examples/statemachine/rogue/window.h
index 025ec79600..bdadad463d 100644
--- a/examples/statemachine/rogue/window.h
+++ b/examples/statemachine/rogue/window.h
@@ -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
diff --git a/examples/statemachine/trafficlight/main.cpp b/examples/statemachine/trafficlight/main.cpp
index 9b10360ae2..353dfb721e 100644
--- a/examples/statemachine/trafficlight/main.cpp
+++ b/examples/statemachine/trafficlight/main.cpp
@@ -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();
}
diff --git a/examples/statemachine/trafficlight/trafficlight.desktop b/examples/statemachine/trafficlight/trafficlight.desktop
new file mode 100644
index 0000000000..8a5cc1673b
--- /dev/null
+++ b/examples/statemachine/trafficlight/trafficlight.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Traffic Light
+Exec=/opt/usr/bin/trafficlight
+Icon=trafficlight
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/trafficlight/trafficlight.pro b/examples/statemachine/trafficlight/trafficlight.pro
index 78367b0b03..f3f9cbb321 100644
--- a/examples/statemachine/trafficlight/trafficlight.pro
+++ b/examples/statemachine/trafficlight/trafficlight.pro
@@ -6,3 +6,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS trafficlight.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/trafficlight
INSTALLS += target sources
QT += widgets
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/statemachine/twowaybutton/main.cpp b/examples/statemachine/twowaybutton/main.cpp
index a6c7000446..3956c2e1c4 100644
--- a/examples/statemachine/twowaybutton/main.cpp
+++ b/examples/statemachine/twowaybutton/main.cpp
@@ -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]
diff --git a/examples/statemachine/twowaybutton/twowaybutton.desktop b/examples/statemachine/twowaybutton/twowaybutton.desktop
new file mode 100644
index 0000000000..9dd0918937
--- /dev/null
+++ b/examples/statemachine/twowaybutton/twowaybutton.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Two-way Button
+Exec=/opt/usr/bin/twowaybutton
+Icon=twowaybutton
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/statemachine/twowaybutton/twowaybutton.pro b/examples/statemachine/twowaybutton/twowaybutton.pro
index 717f0b5498..3861fb8599 100644
--- a/examples/statemachine/twowaybutton/twowaybutton.pro
+++ b/examples/statemachine/twowaybutton/twowaybutton.pro
@@ -6,3 +6,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS twowaybutton.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/statemachine/twowaybutton
INSTALLS += target sources
QT += widgets
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/threads/mandelbrot/main.cpp b/examples/threads/mandelbrot/main.cpp
index 610534d4a3..5211c2051c 100644
--- a/examples/threads/mandelbrot/main.cpp
+++ b/examples/threads/mandelbrot/main.cpp
@@ -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]
diff --git a/examples/threads/mandelbrot/mandelbrot.desktop b/examples/threads/mandelbrot/mandelbrot.desktop
new file mode 100644
index 0000000000..3e70e1aa06
--- /dev/null
+++ b/examples/threads/mandelbrot/mandelbrot.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Mandelbrot
+Exec=/opt/usr/bin/mandelbrot
+Icon=mandelbrot
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/threads/mandelbrot/mandelbrot.pro b/examples/threads/mandelbrot/mandelbrot.pro
index c19a9bd1aa..0e053af072 100644
--- a/examples/threads/mandelbrot/mandelbrot.pro
+++ b/examples/threads/mandelbrot/mandelbrot.pro
@@ -14,3 +14,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.cpp b/examples/threads/mandelbrot/mandelbrotwidget.cpp
index b4233538d9..7cee70f547 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.cpp
+++ b/examples/threads/mandelbrot/mandelbrotwidget.cpp
@@ -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]
diff --git a/examples/threads/mandelbrot/mandelbrotwidget.h b/examples/threads/mandelbrot/mandelbrotwidget.h
index 5af3a8dffd..53bbeb6469 100644
--- a/examples/threads/mandelbrot/mandelbrotwidget.h
+++ b/examples/threads/mandelbrot/mandelbrotwidget.h
@@ -43,9 +43,35 @@
#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;
diff --git a/examples/threads/queuedcustomtype/main.cpp b/examples/threads/queuedcustomtype/main.cpp
index d70a88a095..356352a326 100644
--- a/examples/threads/queuedcustomtype/main.cpp
+++ b/examples/threads/queuedcustomtype/main.cpp
@@ -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]
diff --git a/examples/threads/queuedcustomtype/queuedcustomtype.desktop b/examples/threads/queuedcustomtype/queuedcustomtype.desktop
new file mode 100644
index 0000000000..fa5ed7aa35
--- /dev/null
+++ b/examples/threads/queuedcustomtype/queuedcustomtype.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Queued Custom Type
+Exec=/opt/usr/bin/queuedcustomtype
+Icon=queuedcustomtype
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/threads/queuedcustomtype/queuedcustomtype.pro b/examples/threads/queuedcustomtype/queuedcustomtype.pro
index f26ab6cde5..fc8d4d7bc6 100644
--- a/examples/threads/queuedcustomtype/queuedcustomtype.pro
+++ b/examples/threads/queuedcustomtype/queuedcustomtype.pro
@@ -6,3 +6,13 @@ SOURCES = main.cpp \
renderthread.cpp \
window.cpp
QT += widgets
+
+# 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)
+
diff --git a/examples/threads/semaphores/semaphores.cpp b/examples/threads/semaphores/semaphores.cpp
index 88630def09..3632895c61 100644
--- a/examples/threads/semaphores/semaphores.cpp
+++ b/examples/threads/semaphores/semaphores.cpp
@@ -38,13 +38,18 @@
**
****************************************************************************/
-#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"
diff --git a/examples/threads/semaphores/semaphores.desktop b/examples/threads/semaphores/semaphores.desktop
new file mode 100644
index 0000000000..a7dc46722f
--- /dev/null
+++ b/examples/threads/semaphores/semaphores.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Semaphores
+Exec=/opt/usr/bin/semaphores
+Icon=semaphores
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/threads/semaphores/semaphores.pro b/examples/threads/semaphores/semaphores.pro
index 185a051986..96ab3a525f 100644
--- a/examples/threads/semaphores/semaphores.pro
+++ b/examples/threads/semaphores/semaphores.pro
@@ -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)
diff --git a/examples/threads/threads.pro b/examples/threads/threads.pro
index 33a9d95770..9bdf900f5b 100644
--- a/examples/threads/threads.pro
+++ b/examples/threads/threads.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/threads/waitconditions/waitconditions.cpp b/examples/threads/waitconditions/waitconditions.cpp
index 5c8cb7149f..0063db5b91 100644
--- a/examples/threads/waitconditions/waitconditions.cpp
+++ b/examples/threads/waitconditions/waitconditions.cpp
@@ -38,13 +38,18 @@
**
****************************************************************************/
-#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"
diff --git a/examples/threads/waitconditions/waitconditions.desktop b/examples/threads/waitconditions/waitconditions.desktop
new file mode 100644
index 0000000000..4fbc3047d7
--- /dev/null
+++ b/examples/threads/waitconditions/waitconditions.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Wait Conditions
+Exec=/opt/usr/bin/waitconditions
+Icon=waitconditions
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/threads/waitconditions/waitconditions.pro b/examples/threads/waitconditions/waitconditions.pro
index 53350d2dae..e326afa081 100644
--- a/examples/threads/waitconditions/waitconditions.pro
+++ b/examples/threads/waitconditions/waitconditions.pro
@@ -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)
diff --git a/examples/tools/codecs/codecs.desktop b/examples/tools/codecs/codecs.desktop
new file mode 100644
index 0000000000..bba62207f8
--- /dev/null
+++ b/examples/tools/codecs/codecs.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Codecs
+Exec=/opt/usr/bin/codecs
+Icon=codecs
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/codecs/codecs.pro b/examples/tools/codecs/codecs.pro
index 5f92b94a00..b906190e0f 100644
--- a/examples/tools/codecs/codecs.pro
+++ b/examples/tools/codecs/codecs.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/completer/completer.desktop b/examples/tools/completer/completer.desktop
new file mode 100644
index 0000000000..f7e2d155d8
--- /dev/null
+++ b/examples/tools/completer/completer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Completer
+Exec=/opt/usr/bin/completer
+Icon=completer
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/completer/completer.pro b/examples/tools/completer/completer.pro
index 016b7547f9..2077ebd750 100644
--- a/examples/tools/completer/completer.pro
+++ b/examples/tools/completer/completer.pro
@@ -13,3 +13,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/contiguouscache/contiguouscache.desktop b/examples/tools/contiguouscache/contiguouscache.desktop
new file mode 100644
index 0000000000..e89e2067f4
--- /dev/null
+++ b/examples/tools/contiguouscache/contiguouscache.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Contiguous Cache
+Exec=/opt/usr/bin/contiguouscache
+Icon=contiguouscache
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/contiguouscache/contiguouscache.pro b/examples/tools/contiguouscache/contiguouscache.pro
index 1bdd5b9573..bd9e3db05f 100644
--- a/examples/tools/contiguouscache/contiguouscache.pro
+++ b/examples/tools/contiguouscache/contiguouscache.pro
@@ -8,3 +8,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS contiguouscache.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tools/contiguouscache
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tools/customcompleter/customcompleter.desktop b/examples/tools/customcompleter/customcompleter.desktop
new file mode 100644
index 0000000000..bbc21112ad
--- /dev/null
+++ b/examples/tools/customcompleter/customcompleter.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Custom Completer
+Exec=/opt/usr/bin/customcompleter
+Icon=customcompleter
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/customcompleter/customcompleter.pro b/examples/tools/customcompleter/customcompleter.pro
index b4bbace109..fe417185b9 100644
--- a/examples/tools/customcompleter/customcompleter.pro
+++ b/examples/tools/customcompleter/customcompleter.pro
@@ -13,3 +13,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/customtype/customtype.desktop b/examples/tools/customtype/customtype.desktop
new file mode 100644
index 0000000000..ff15e19cb6
--- /dev/null
+++ b/examples/tools/customtype/customtype.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Custom Type
+Exec=/opt/usr/bin/customtype
+Icon=customtype
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/customtype/customtype.pro b/examples/tools/customtype/customtype.pro
index 893c9132ab..c63425f49d 100644
--- a/examples/tools/customtype/customtype.pro
+++ b/examples/tools/customtype/customtype.pro
@@ -2,3 +2,16 @@ HEADERS = message.h
SOURCES = main.cpp \
message.cpp
QT += widgets
+
+# 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)
diff --git a/examples/tools/customtypesending/customtypesending.desktop b/examples/tools/customtypesending/customtypesending.desktop
new file mode 100644
index 0000000000..dd59b4393a
--- /dev/null
+++ b/examples/tools/customtypesending/customtypesending.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Custom Type Sending
+Exec=/opt/usr/bin/customtypesending
+Icon=customtypesending
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/customtypesending/customtypesending.pro b/examples/tools/customtypesending/customtypesending.pro
index 0c13eaca19..3388888dfe 100644
--- a/examples/tools/customtypesending/customtypesending.pro
+++ b/examples/tools/customtypesending/customtypesending.pro
@@ -4,3 +4,16 @@ SOURCES = main.cpp \
message.cpp \
window.cpp
QT += widgets
+
+# 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)
diff --git a/examples/tools/echoplugin/echoplugin.pro b/examples/tools/echoplugin/echoplugin.pro
index 94dc8baca1..66a268f4a0 100644
--- a/examples/tools/echoplugin/echoplugin.pro
+++ b/examples/tools/echoplugin/echoplugin.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tools/echoplugin/echowindow/echowindow.desktop b/examples/tools/echoplugin/echowindow/echowindow.desktop
new file mode 100644
index 0000000000..7b36de401d
--- /dev/null
+++ b/examples/tools/echoplugin/echowindow/echowindow.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Echo Window
+Exec=/opt/usr/bin/echowindow
+Icon=echowindow
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/echoplugin/echowindow/echowindow.pro b/examples/tools/echoplugin/echowindow/echowindow.pro
index 59347da188..65aa594b99 100644
--- a/examples/tools/echoplugin/echowindow/echowindow.pro
+++ b/examples/tools/echoplugin/echowindow/echowindow.pro
@@ -20,3 +20,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/echoplugin/plugin/plugin.desktop b/examples/tools/echoplugin/plugin/plugin.desktop
new file mode 100644
index 0000000000..5aba4d1c87
--- /dev/null
+++ b/examples/tools/echoplugin/plugin/plugin.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Echo Plugin
+Exec=/opt/usr/bin/plugin
+Icon=plugin
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/echoplugin/plugin/plugin.pro b/examples/tools/echoplugin/plugin/plugin.pro
index c591850597..1d98c67698 100644
--- a/examples/tools/echoplugin/plugin/plugin.pro
+++ b/examples/tools/echoplugin/plugin/plugin.pro
@@ -14,7 +14,15 @@ 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
QT += widgets
+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)
diff --git a/examples/tools/i18n/i18n.desktop b/examples/tools/i18n/i18n.desktop
new file mode 100644
index 0000000000..e1632c4d04
--- /dev/null
+++ b/examples/tools/i18n/i18n.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=I18N
+Exec=/opt/usr/bin/i18n
+Icon=i18n
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/i18n/i18n.pro b/examples/tools/i18n/i18n.pro
index b470587228..e315c981cc 100644
--- a/examples/tools/i18n/i18n.pro
+++ b/examples/tools/i18n/i18n.pro
@@ -27,3 +27,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/inputpanel/inputpanel.desktop b/examples/tools/inputpanel/inputpanel.desktop
new file mode 100644
index 0000000000..3cc9bd078a
--- /dev/null
+++ b/examples/tools/inputpanel/inputpanel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Input Panel
+Exec=/opt/usr/bin/inputpanel
+Icon=inputpanel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/inputpanel/inputpanel.pro b/examples/tools/inputpanel/inputpanel.pro
index 2d493217a7..370ac5da54 100644
--- a/examples/tools/inputpanel/inputpanel.pro
+++ b/examples/tools/inputpanel/inputpanel.pro
@@ -16,3 +16,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/plugandpaint/plugandpaint.desktop b/examples/tools/plugandpaint/plugandpaint.desktop
new file mode 100644
index 0000000000..e39d512225
--- /dev/null
+++ b/examples/tools/plugandpaint/plugandpaint.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Plug appnameplaceholder Paint
+Exec=/opt/usr/bin/plugandpaint
+Icon=plugandpaint
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/plugandpaint/plugandpaint.pro b/examples/tools/plugandpaint/plugandpaint.pro
index 88535483f2..d2ab1bad45 100644
--- a/examples/tools/plugandpaint/plugandpaint.pro
+++ b/examples/tools/plugandpaint/plugandpaint.pro
@@ -27,3 +27,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/plugandpaintplugins/basictools/basictools.pro b/examples/tools/plugandpaintplugins/basictools/basictools.pro
index a614d507d2..2b2f45ae60 100644
--- a/examples/tools/plugandpaintplugins/basictools/basictools.pro
+++ b/examples/tools/plugandpaintplugins/basictools/basictools.pro
@@ -16,3 +16,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
index 5c3805d8af..16d96c56ec 100644
--- a/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
+++ b/examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro
@@ -18,3 +18,4 @@ symbian: CONFIG += qt_example
symbian:TARGET.EPOCALLOWDLLDATA = 1
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
index ef85148559..deda635b89 100644
--- a/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
+++ b/examples/tools/plugandpaintplugins/plugandpaintplugins.pro
@@ -10,3 +10,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tools/regexp/regexp.desktop b/examples/tools/regexp/regexp.desktop
new file mode 100644
index 0000000000..b3ae14e360
--- /dev/null
+++ b/examples/tools/regexp/regexp.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Regular Expressions
+Exec=/opt/usr/bin/regexp
+Icon=regexp
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/regexp/regexp.pro b/examples/tools/regexp/regexp.pro
index c6f4846e94..62ae570ef1 100644
--- a/examples/tools/regexp/regexp.pro
+++ b/examples/tools/regexp/regexp.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/settingseditor/settingseditor.desktop b/examples/tools/settingseditor/settingseditor.desktop
new file mode 100644
index 0000000000..b8561a6f3a
--- /dev/null
+++ b/examples/tools/settingseditor/settingseditor.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Settings Editor
+Exec=/opt/usr/bin/settingseditor
+Icon=settingseditor
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/settingseditor/settingseditor.pro b/examples/tools/settingseditor/settingseditor.pro
index ebf9a9240a..788b4def0b 100644
--- a/examples/tools/settingseditor/settingseditor.pro
+++ b/examples/tools/settingseditor/settingseditor.pro
@@ -16,3 +16,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/styleplugin/plugin/plugin.pro b/examples/tools/styleplugin/plugin/plugin.pro
index 795da2cb9f..46e5ec1928 100644
--- a/examples/tools/styleplugin/plugin/plugin.pro
+++ b/examples/tools/styleplugin/plugin/plugin.pro
@@ -24,3 +24,4 @@ symbian: CONFIG += qt_example
symbian:TARGET.EPOCALLOWDLLDATA = 1
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
diff --git a/examples/tools/styleplugin/styleplugin.pro b/examples/tools/styleplugin/styleplugin.pro
index fd03f0075f..6d8c09ffbb 100644
--- a/examples/tools/styleplugin/styleplugin.pro
+++ b/examples/tools/styleplugin/styleplugin.pro
@@ -10,3 +10,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tools/styleplugin/stylewindow/stylewindow.pro b/examples/tools/styleplugin/stylewindow/stylewindow.pro
index 35e0a65dd1..cdbe9f6553 100644
--- a/examples/tools/styleplugin/stylewindow/stylewindow.pro
+++ b/examples/tools/styleplugin/stylewindow/stylewindow.pro
@@ -18,3 +18,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro
index 6d0d722995..fb138b188a 100644
--- a/examples/tools/tools.pro
+++ b/examples/tools/tools.pro
@@ -25,3 +25,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.desktop b/examples/tools/treemodelcompleter/treemodelcompleter.desktop
new file mode 100644
index 0000000000..a54aa7b66e
--- /dev/null
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Tree Model Completer
+Exec=/opt/usr/bin/treemodelcompleter
+Icon=treemodelcompleter
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/treemodelcompleter/treemodelcompleter.pro b/examples/tools/treemodelcompleter/treemodelcompleter.pro
index 220cdb9091..c64b44be8f 100644
--- a/examples/tools/treemodelcompleter/treemodelcompleter.pro
+++ b/examples/tools/treemodelcompleter/treemodelcompleter.pro
@@ -13,3 +13,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tools/undoframework/undoframework.desktop b/examples/tools/undoframework/undoframework.desktop
new file mode 100644
index 0000000000..24b7f320f4
--- /dev/null
+++ b/examples/tools/undoframework/undoframework.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Undo Framework
+Exec=/opt/usr/bin/undoframework
+Icon=undoframework
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tools/undoframework/undoframework.pro b/examples/tools/undoframework/undoframework.pro
index cac35b01d9..a356ce935e 100644
--- a/examples/tools/undoframework/undoframework.pro
+++ b/examples/tools/undoframework/undoframework.pro
@@ -17,3 +17,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/touch/dials/dials.desktop b/examples/touch/dials/dials.desktop
new file mode 100644
index 0000000000..1536099914
--- /dev/null
+++ b/examples/touch/dials/dials.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Touch Dials
+Exec=/opt/usr/bin/dials
+Icon=dials
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/touch/dials/dials.pro b/examples/touch/dials/dials.pro
index e7d40b6409..e69f7ab00e 100644
--- a/examples/touch/dials/dials.pro
+++ b/examples/touch/dials/dials.pro
@@ -7,3 +7,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dials.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/dials
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/touch/fingerpaint/fingerpaint.desktop b/examples/touch/fingerpaint/fingerpaint.desktop
new file mode 100644
index 0000000000..a0bcf3128e
--- /dev/null
+++ b/examples/touch/fingerpaint/fingerpaint.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Finger Paint
+Exec=/opt/usr/bin/fingerpaint
+Icon=fingerpaint
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/touch/fingerpaint/fingerpaint.pro b/examples/touch/fingerpaint/fingerpaint.pro
index 3572674e3a..b41e6a3e4c 100644
--- a/examples/touch/fingerpaint/fingerpaint.pro
+++ b/examples/touch/fingerpaint/fingerpaint.pro
@@ -10,3 +10,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS fingerpaint.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/fingerpaint
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/touch/knobs/knobs.desktop b/examples/touch/knobs/knobs.desktop
new file mode 100644
index 0000000000..bf2fe32b24
--- /dev/null
+++ b/examples/touch/knobs/knobs.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Touch Knobs
+Exec=/opt/usr/bin/knobs
+Icon=knobs
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/touch/knobs/knobs.pro b/examples/touch/knobs/knobs.pro
index 89793f5dde..043ae8ac13 100644
--- a/examples/touch/knobs/knobs.pro
+++ b/examples/touch/knobs/knobs.pro
@@ -7,3 +7,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS knobs.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/knobs
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/touch/pinchzoom/pinchzoom.desktop b/examples/touch/pinchzoom/pinchzoom.desktop
new file mode 100644
index 0000000000..727e626eed
--- /dev/null
+++ b/examples/touch/pinchzoom/pinchzoom.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Pinch Zoom
+Exec=/opt/usr/bin/pinchzoom
+Icon=pinchzoom
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/touch/pinchzoom/pinchzoom.pro b/examples/touch/pinchzoom/pinchzoom.pro
index 660fbc5563..6d4dbf43d2 100644
--- a/examples/touch/pinchzoom/pinchzoom.pro
+++ b/examples/touch/pinchzoom/pinchzoom.pro
@@ -15,3 +15,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS pinchzoom.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/touch/pinchzoom
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/addressbook-fr.pro b/examples/tutorials/addressbook-fr/addressbook-fr.pro
index 0b76e41169..0ee8387437 100644
--- a/examples/tutorials/addressbook-fr/addressbook-fr.pro
+++ b/examples/tutorials/addressbook-fr/addressbook-fr.pro
@@ -7,3 +7,4 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS addressbook-fr.pro READM
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook-fr
INSTALLS += target sources
QT += widgets
+
diff --git a/examples/tutorials/addressbook-fr/part1/part1.desktop b/examples/tutorials/addressbook-fr/part1/part1.desktop
new file mode 100644
index 0000000000..0cf4115f33
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part1/part1.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=1 Address Book FR
+Exec=/opt/usr/bin/part1
+Icon=part1
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part1/part1.pro b/examples/tutorials/addressbook-fr/part1/part1.pro
index a11c0889ee..cb4b6ecbde 100644
--- a/examples/tutorials/addressbook-fr/part1/part1.pro
+++ b/examples/tutorials/addressbook-fr/part1/part1.pro
@@ -8,3 +8,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part1
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/part2/part2.desktop b/examples/tutorials/addressbook-fr/part2/part2.desktop
new file mode 100644
index 0000000000..681c6a1e4d
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part2/part2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=2 Address Book FR
+Exec=/opt/usr/bin/part2
+Icon=part2
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part2/part2.pro b/examples/tutorials/addressbook-fr/part2/part2.pro
index 9d90065f2d..a3393bee28 100644
--- a/examples/tutorials/addressbook-fr/part2/part2.pro
+++ b/examples/tutorials/addressbook-fr/part2/part2.pro
@@ -8,3 +8,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part2.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part2
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/part3/part3.desktop b/examples/tutorials/addressbook-fr/part3/part3.desktop
new file mode 100644
index 0000000000..3c97d51f4e
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part3/part3.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=3 Address Book FR
+Exec=/opt/usr/bin/part3
+Icon=part3
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part3/part3.pro b/examples/tutorials/addressbook-fr/part3/part3.pro
index ac076242f7..063feac12f 100644
--- a/examples/tutorials/addressbook-fr/part3/part3.pro
+++ b/examples/tutorials/addressbook-fr/part3/part3.pro
@@ -8,3 +8,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part3.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part3
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/part4/part4.desktop b/examples/tutorials/addressbook-fr/part4/part4.desktop
new file mode 100644
index 0000000000..7726989689
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part4/part4.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=4 Address Book FR
+Exec=/opt/usr/bin/part4
+Icon=part4
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part4/part4.pro b/examples/tutorials/addressbook-fr/part4/part4.pro
index 70dc8f2bc4..90e2ce7ad5 100644
--- a/examples/tutorials/addressbook-fr/part4/part4.pro
+++ b/examples/tutorials/addressbook-fr/part4/part4.pro
@@ -8,3 +8,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part4.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part4
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/part5/part5.desktop b/examples/tutorials/addressbook-fr/part5/part5.desktop
new file mode 100644
index 0000000000..0efcb1550c
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part5/part5.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=5 Address Book FR
+Exec=/opt/usr/bin/part5
+Icon=part5
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part5/part5.pro b/examples/tutorials/addressbook-fr/part5/part5.pro
index 99d0a54c53..dc6099ed2c 100644
--- a/examples/tutorials/addressbook-fr/part5/part5.pro
+++ b/examples/tutorials/addressbook-fr/part5/part5.pro
@@ -10,3 +10,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part5.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part5
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/part6/part6.desktop b/examples/tutorials/addressbook-fr/part6/part6.desktop
new file mode 100644
index 0000000000..144025924a
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part6/part6.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=6 Address Book FR
+Exec=/opt/usr/bin/part6
+Icon=part6
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part6/part6.pro b/examples/tutorials/addressbook-fr/part6/part6.pro
index 9b9fc52dd9..a7e48be141 100644
--- a/examples/tutorials/addressbook-fr/part6/part6.pro
+++ b/examples/tutorials/addressbook-fr/part6/part6.pro
@@ -10,3 +10,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part6.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part6
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook-fr/part7/part7.desktop b/examples/tutorials/addressbook-fr/part7/part7.desktop
new file mode 100644
index 0000000000..f78ff4b221
--- /dev/null
+++ b/examples/tutorials/addressbook-fr/part7/part7.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=7 Address Book FR
+Exec=/opt/usr/bin/part7
+Icon=part7
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook-fr/part7/part7.pro b/examples/tutorials/addressbook-fr/part7/part7.pro
index bf70213d93..1e773fd093 100644
--- a/examples/tutorials/addressbook-fr/part7/part7.pro
+++ b/examples/tutorials/addressbook-fr/part7/part7.pro
@@ -10,3 +10,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part7.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/addressbook/part7
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/addressbook/addressbook.pro b/examples/tutorials/addressbook/addressbook.pro
index ee13040220..09972a92cc 100644
--- a/examples/tutorials/addressbook/addressbook.pro
+++ b/examples/tutorials/addressbook/addressbook.pro
@@ -9,3 +9,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/addressbook/part1/part1.desktop b/examples/tutorials/addressbook/part1/part1.desktop
new file mode 100644
index 0000000000..69946edf46
--- /dev/null
+++ b/examples/tutorials/addressbook/part1/part1.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=1 Address Book
+Exec=/opt/usr/bin/part1
+Icon=part1
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part1/part1.pro b/examples/tutorials/addressbook/part1/part1.pro
index 272024a652..ba236a146d 100644
--- a/examples/tutorials/addressbook/part1/part1.pro
+++ b/examples/tutorials/addressbook/part1/part1.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/addressbook/part2/part2.desktop b/examples/tutorials/addressbook/part2/part2.desktop
new file mode 100644
index 0000000000..5c87ef807b
--- /dev/null
+++ b/examples/tutorials/addressbook/part2/part2.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=2 Address Book
+Exec=/opt/usr/bin/part2
+Icon=part2
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part2/part2.pro b/examples/tutorials/addressbook/part2/part2.pro
index 57c547563d..fc8ba7b148 100644
--- a/examples/tutorials/addressbook/part2/part2.pro
+++ b/examples/tutorials/addressbook/part2/part2.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/addressbook/part3/part3.desktop b/examples/tutorials/addressbook/part3/part3.desktop
new file mode 100644
index 0000000000..882a242b44
--- /dev/null
+++ b/examples/tutorials/addressbook/part3/part3.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=3 Address Book
+Exec=/opt/usr/bin/part3
+Icon=part3
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part3/part3.pro b/examples/tutorials/addressbook/part3/part3.pro
index c352115602..38c1d6ea4b 100644
--- a/examples/tutorials/addressbook/part3/part3.pro
+++ b/examples/tutorials/addressbook/part3/part3.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/addressbook/part4/part4.desktop b/examples/tutorials/addressbook/part4/part4.desktop
new file mode 100644
index 0000000000..27802b10f2
--- /dev/null
+++ b/examples/tutorials/addressbook/part4/part4.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=4 Address Book
+Exec=/opt/usr/bin/part4
+Icon=part4
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part4/part4.pro b/examples/tutorials/addressbook/part4/part4.pro
index b288857339..9ca4efb124 100644
--- a/examples/tutorials/addressbook/part4/part4.pro
+++ b/examples/tutorials/addressbook/part4/part4.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/addressbook/part5/part5.desktop b/examples/tutorials/addressbook/part5/part5.desktop
new file mode 100644
index 0000000000..e8b151c40f
--- /dev/null
+++ b/examples/tutorials/addressbook/part5/part5.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=5 Address Book
+Exec=/opt/usr/bin/part5
+Icon=part5
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part5/part5.pro b/examples/tutorials/addressbook/part5/part5.pro
index 6932373ed7..7d6279557f 100644
--- a/examples/tutorials/addressbook/part5/part5.pro
+++ b/examples/tutorials/addressbook/part5/part5.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/addressbook/part6/part6.desktop b/examples/tutorials/addressbook/part6/part6.desktop
new file mode 100644
index 0000000000..dd49260597
--- /dev/null
+++ b/examples/tutorials/addressbook/part6/part6.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=6 Address Book
+Exec=/opt/usr/bin/part6
+Icon=part6
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part6/part6.pro b/examples/tutorials/addressbook/part6/part6.pro
index b797debc42..c9fcb87d91 100644
--- a/examples/tutorials/addressbook/part6/part6.pro
+++ b/examples/tutorials/addressbook/part6/part6.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/addressbook/part7/part7.desktop b/examples/tutorials/addressbook/part7/part7.desktop
new file mode 100644
index 0000000000..26d3fdd292
--- /dev/null
+++ b/examples/tutorials/addressbook/part7/part7.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=7 Address Book
+Exec=/opt/usr/bin/part7
+Icon=part7
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/addressbook/part7/part7.pro b/examples/tutorials/addressbook/part7/part7.pro
index 49313f1dfa..a9183443ff 100644
--- a/examples/tutorials/addressbook/part7/part7.pro
+++ b/examples/tutorials/addressbook/part7/part7.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/gettingStarted/gsQt/part1/part1.pro b/examples/tutorials/gettingStarted/gsQt/part1/part1.pro
new file mode 100755
index 0000000000..f52a6331b5
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part1/part1.pro
@@ -0,0 +1,8 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/gettingStarted/gsQt/part1
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorial/gettingStarted/gsQt/part1
+INSTALLS += target sources
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part2/part2.pro b/examples/tutorials/gettingStarted/gsQt/part2/part2.pro
new file mode 100755
index 0000000000..383c3ce5ba
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part2/part2.pro
@@ -0,0 +1,9 @@
+
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/gettingStarted/gsQt/part2
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorial/gettingStarted/gsQt/part2
+INSTALLS += target sources
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part3/part3.pro b/examples/tutorials/gettingStarted/gsQt/part3/part3.pro
new file mode 100755
index 0000000000..d194acb2e2
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part3/part3.pro
@@ -0,0 +1,9 @@
+
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/gettingStarted/gsQt/part3
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorial/gettingStarted/gsQt/part3
+INSTALLS += target sources
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part4/part4.pro b/examples/tutorials/gettingStarted/gsQt/part4/part4.pro
new file mode 100755
index 0000000000..3de03accc0
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part4/part4.pro
@@ -0,0 +1,9 @@
+
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/gettingStarted/gsQt/part4
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorial/gettingStarted/gsQt/part4
+INSTALLS += target sources
+
diff --git a/examples/tutorials/gettingStarted/gsQt/part5/part5.pro b/examples/tutorials/gettingStarted/gsQt/part5/part5.pro
new file mode 100755
index 0000000000..711cac212a
--- /dev/null
+++ b/examples/tutorials/gettingStarted/gsQt/part5/part5.pro
@@ -0,0 +1,9 @@
+
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/gettingStarted/gsQt/part5
+sources.files = $$SOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorial/gettingStarted/gsQt/part5
+INSTALLS += target sources
+
diff --git a/examples/tutorials/modelview/1_readonly/1_readonly.desktop b/examples/tutorials/modelview/1_readonly/1_readonly.desktop
new file mode 100644
index 0000000000..137f56eacd
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/1_readonly.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=1 Model View
+Exec=/opt/usr/bin/1_readonly
+Icon=1_readonly
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/1_readonly/1_readonly.pro b/examples/tutorials/modelview/1_readonly/1_readonly.pro
index 82c763615f..e794f192be 100755
--- a/examples/tutorials/modelview/1_readonly/1_readonly.pro
+++ b/examples/tutorials/modelview/1_readonly/1_readonly.pro
@@ -16,3 +16,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/2_formatting/2_formatting.desktop b/examples/tutorials/modelview/2_formatting/2_formatting.desktop
new file mode 100644
index 0000000000..a3950001ba
--- /dev/null
+++ b/examples/tutorials/modelview/2_formatting/2_formatting.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=2 Model View
+Exec=/opt/usr/bin/2_formatting
+Icon=2_formatting
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/2_formatting/2_formatting.pro b/examples/tutorials/modelview/2_formatting/2_formatting.pro
index 3e5a18ca49..9065100a3c 100755
--- a/examples/tutorials/modelview/2_formatting/2_formatting.pro
+++ b/examples/tutorials/modelview/2_formatting/2_formatting.pro
@@ -15,3 +15,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/3_changingmodel/3_changingmodel.desktop b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.desktop
new file mode 100644
index 0000000000..3e053c94b1
--- /dev/null
+++ b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=3 Model View
+Exec=/opt/usr/bin/3_changingmodel
+Icon=3_changingmodel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
index f19cf9c98f..58070a5b57 100755
--- a/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
+++ b/examples/tutorials/modelview/3_changingmodel/3_changingmodel.pro
@@ -15,3 +15,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/4_headers/4_headers.desktop b/examples/tutorials/modelview/4_headers/4_headers.desktop
new file mode 100644
index 0000000000..f17fe456f2
--- /dev/null
+++ b/examples/tutorials/modelview/4_headers/4_headers.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=4 Model View
+Exec=/opt/usr/bin/4_headers
+Icon=4_headers
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/4_headers/4_headers.pro b/examples/tutorials/modelview/4_headers/4_headers.pro
index d3e8670685..819daabdfa 100755
--- a/examples/tutorials/modelview/4_headers/4_headers.pro
+++ b/examples/tutorials/modelview/4_headers/4_headers.pro
@@ -15,3 +15,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/5_edit/5_edit.desktop b/examples/tutorials/modelview/5_edit/5_edit.desktop
new file mode 100644
index 0000000000..4402c0a379
--- /dev/null
+++ b/examples/tutorials/modelview/5_edit/5_edit.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=5 Model View
+Exec=/opt/usr/bin/5_edit
+Icon=5_edit
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/5_edit/5_edit.pro b/examples/tutorials/modelview/5_edit/5_edit.pro
index 7736cb94cf..bab5d49bce 100755
--- a/examples/tutorials/modelview/5_edit/5_edit.pro
+++ b/examples/tutorials/modelview/5_edit/5_edit.pro
@@ -17,3 +17,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/6_treeview/6_treeview.desktop b/examples/tutorials/modelview/6_treeview/6_treeview.desktop
new file mode 100644
index 0000000000..e0b872bf9c
--- /dev/null
+++ b/examples/tutorials/modelview/6_treeview/6_treeview.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=6 Model View
+Exec=/opt/usr/bin/6_treeview
+Icon=6_treeview
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/6_treeview/6_treeview.pro b/examples/tutorials/modelview/6_treeview/6_treeview.pro
index 449d0b146f..3dfc324512 100755
--- a/examples/tutorials/modelview/6_treeview/6_treeview.pro
+++ b/examples/tutorials/modelview/6_treeview/6_treeview.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/7_selections/7_selections.desktop b/examples/tutorials/modelview/7_selections/7_selections.desktop
new file mode 100644
index 0000000000..afba38361f
--- /dev/null
+++ b/examples/tutorials/modelview/7_selections/7_selections.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=7 Model View
+Exec=/opt/usr/bin/7_selections
+Icon=7_selections
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/modelview/7_selections/7_selections.pro b/examples/tutorials/modelview/7_selections/7_selections.pro
index bc09371aff..1b666d2484 100755
--- a/examples/tutorials/modelview/7_selections/7_selections.pro
+++ b/examples/tutorials/modelview/7_selections/7_selections.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/tutorials/modelview/modelview.pro b/examples/tutorials/modelview/modelview.pro
index 5c55ccb9d1..10ac8ae77f 100755
--- a/examples/tutorials/modelview/modelview.pro
+++ b/examples/tutorials/modelview/modelview.pro
@@ -15,3 +15,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/tutorials/widgets/childwidget/childwidget.desktop b/examples/tutorials/widgets/childwidget/childwidget.desktop
new file mode 100644
index 0000000000..81bc7c16f1
--- /dev/null
+++ b/examples/tutorials/widgets/childwidget/childwidget.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Child Widgets
+Exec=/opt/usr/bin/childwidget
+Icon=childwidget
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/widgets/childwidget/childwidget.pro b/examples/tutorials/widgets/childwidget/childwidget.pro
index f23193fa29..a876ed9e2c 100644
--- a/examples/tutorials/widgets/childwidget/childwidget.pro
+++ b/examples/tutorials/widgets/childwidget/childwidget.pro
@@ -6,3 +6,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS childwidget.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/childwidget
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/widgets/nestedlayouts/nestedlayouts.desktop b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.desktop
new file mode 100644
index 0000000000..9ff737d079
--- /dev/null
+++ b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Nested Layouts
+Exec=/opt/usr/bin/nestedlayouts
+Icon=nestedlayouts
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro
index 28b935d3b4..f668b42f2e 100644
--- a/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro
+++ b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro
@@ -6,3 +6,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS nestedlayouts.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/nestedlayouts
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/widgets/toplevel/toplevel.desktop b/examples/tutorials/widgets/toplevel/toplevel.desktop
new file mode 100644
index 0000000000..5626297c67
--- /dev/null
+++ b/examples/tutorials/widgets/toplevel/toplevel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Creating a Window
+Exec=/opt/usr/bin/toplevel
+Icon=toplevel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/widgets/toplevel/toplevel.pro b/examples/tutorials/widgets/toplevel/toplevel.pro
index 3c3351a1f5..cbbf3ff4de 100644
--- a/examples/tutorials/widgets/toplevel/toplevel.pro
+++ b/examples/tutorials/widgets/toplevel/toplevel.pro
@@ -6,3 +6,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS toplevel.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/toplevel
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/tutorials/widgets/windowlayout/windowlayout.desktop b/examples/tutorials/widgets/windowlayout/windowlayout.desktop
new file mode 100644
index 0000000000..4a007952fd
--- /dev/null
+++ b/examples/tutorials/widgets/windowlayout/windowlayout.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Using Layouts
+Exec=/opt/usr/bin/windowlayout
+Icon=windowlayout
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/tutorials/widgets/windowlayout/windowlayout.pro b/examples/tutorials/widgets/windowlayout/windowlayout.pro
index 1517845aa1..a088cdff97 100644
--- a/examples/tutorials/widgets/windowlayout/windowlayout.pro
+++ b/examples/tutorials/widgets/windowlayout/windowlayout.pro
@@ -6,3 +6,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS windowlayout.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/tutorials/widgets/windowlayout
INSTALLS += target sources
QT += widgets
+
+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)
diff --git a/examples/uitools/multipleinheritance/main.cpp b/examples/uitools/multipleinheritance/main.cpp
index f61c92c1c4..56ba8efe53 100644
--- a/examples/uitools/multipleinheritance/main.cpp
+++ b/examples/uitools/multipleinheritance/main.cpp
@@ -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]
diff --git a/examples/uitools/multipleinheritance/multipleinheritance.desktop b/examples/uitools/multipleinheritance/multipleinheritance.desktop
new file mode 100644
index 0000000000..7e652f972b
--- /dev/null
+++ b/examples/uitools/multipleinheritance/multipleinheritance.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Multiple Inheritance
+Exec=/opt/usr/bin/multipleinheritance
+Icon=multipleinheritance
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/uitools/multipleinheritance/multipleinheritance.pro b/examples/uitools/multipleinheritance/multipleinheritance.pro
index 141df564a3..a33f619035 100644
--- a/examples/uitools/multipleinheritance/multipleinheritance.pro
+++ b/examples/uitools/multipleinheritance/multipleinheritance.pro
@@ -15,3 +15,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/uitools/textfinder/textfinder.desktop b/examples/uitools/textfinder/textfinder.desktop
new file mode 100644
index 0000000000..e1911cc61c
--- /dev/null
+++ b/examples/uitools/textfinder/textfinder.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Text Finder
+Exec=/opt/usr/bin/textfinder
+Icon=textfinder
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/uitools/textfinder/textfinder.pro b/examples/uitools/textfinder/textfinder.pro
index 93105c6412..337b7216e4 100644
--- a/examples/uitools/textfinder/textfinder.pro
+++ b/examples/uitools/textfinder/textfinder.pro
@@ -11,3 +11,7 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
+
+symbian: warning(This example does not work on Symbian platform)
+simulator: warning(This example does not work on Simulator platform)
diff --git a/examples/uitools/uitools.pro b/examples/uitools/uitools.pro
index c44c1666bf..f17de666fb 100644
--- a/examples/uitools/uitools.pro
+++ b/examples/uitools/uitools.pro
@@ -11,3 +11,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/widgets/analogclock/analogclock.desktop b/examples/widgets/analogclock/analogclock.desktop
new file mode 100644
index 0000000000..b177a62d35
--- /dev/null
+++ b/examples/widgets/analogclock/analogclock.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Analog Clock
+Exec=/opt/usr/bin/analogclock
+Icon=analogclock
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/analogclock/analogclock.pro b/examples/widgets/analogclock/analogclock.pro
index 2c8737bd68..95233f0968 100644
--- a/examples/widgets/analogclock/analogclock.pro
+++ b/examples/widgets/analogclock/analogclock.pro
@@ -13,3 +13,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/widgets/analogclock/main.cpp b/examples/widgets/analogclock/main.cpp
index 0f31f07573..040fbb0265 100644
--- a/examples/widgets/analogclock/main.cpp
+++ b/examples/widgets/analogclock/main.cpp
@@ -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();
}
diff --git a/examples/widgets/applicationicon/applicationicon.desktop b/examples/widgets/applicationicon/applicationicon.desktop
new file mode 100644
index 0000000000..9645802195
--- /dev/null
+++ b/examples/widgets/applicationicon/applicationicon.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Application Icon
+Exec=/opt/usr/bin/applicationicon
+Icon=applicationicon
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/applicationicon/applicationicon.png b/examples/widgets/applicationicon/applicationicon.png
new file mode 100644
index 0000000000..83a186ee56
--- /dev/null
+++ b/examples/widgets/applicationicon/applicationicon.png
Binary files differ
diff --git a/examples/widgets/applicationicon/applicationicon.pro b/examples/widgets/applicationicon/applicationicon.pro
new file mode 100644
index 0000000000..f9ab55d82b
--- /dev/null
+++ b/examples/widgets/applicationicon/applicationicon.pro
@@ -0,0 +1,30 @@
+
+QT += core gui
+
+TARGET = applicationicon
+TEMPLATE = app
+
+SOURCES += main.cpp
+
+OTHER_FILES += applicationicon.svg \
+ applicationicon.png \
+ applicationicon.desktop
+
+symbian {
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+ # override icon
+ ICON = applicationicon.svg
+ TARGET.UID3 = 0xe9f919ee
+ TARGET.EPOCSTACKSIZE = 0x14000
+ TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+}
+
+maemo5 {
+ include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+ # override icon from maemo5pkgrules.pri
+ icon.files = $${TARGET}.png
+}
+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)
diff --git a/examples/widgets/calculator/calculator.cpp b/examples/widgets/calculator/calculator.cpp
index d938845a86..acdb319952 100644
--- a/examples/widgets/calculator/calculator.cpp
+++ b/examples/widgets/calculator/calculator.cpp
@@ -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);
diff --git a/examples/widgets/calculator/calculator.desktop b/examples/widgets/calculator/calculator.desktop
new file mode 100644
index 0000000000..d0ae81d5a9
--- /dev/null
+++ b/examples/widgets/calculator/calculator.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Calculator
+Exec=/opt/usr/bin/calculator
+Icon=calculator
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/calculator/calculator.h b/examples/widgets/calculator/calculator.h
index e1221f4f70..3548b85625 100644
--- a/examples/widgets/calculator/calculator.h
+++ b/examples/widgets/calculator/calculator.h
@@ -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
diff --git a/examples/widgets/calculator/calculator.pro b/examples/widgets/calculator/calculator.pro
index 5e57372c58..0243347719 100644
--- a/examples/widgets/calculator/calculator.pro
+++ b/examples/widgets/calculator/calculator.pro
@@ -15,3 +15,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/widgets/calculator/main.cpp b/examples/widgets/calculator/main.cpp
index 0038aa10dd..3974f801b1 100644
--- a/examples/widgets/calculator/main.cpp
+++ b/examples/widgets/calculator/main.cpp
@@ -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();
}
diff --git a/examples/widgets/calculator/releasenotes.txt b/examples/widgets/calculator/releasenotes.txt
new file mode 100644
index 0000000000..053f651dba
--- /dev/null
+++ b/examples/widgets/calculator/releasenotes.txt
@@ -0,0 +1,4 @@
+Calculator
+=============
+
+Compared to the original example in the Qt SDK, the Calculator class (calculator.h) has been derived from QWidget instead of QDialog because in Maemo you cannot have any additional controls with dialogs. The mainLayout size constraint has been changed to SetNoConstraint to enable immediate scaling of the grid in Symbian. Screen definition for Symbian has been changed to showMaximized() to enable correct scaling of the application (see main.cpp). \ No newline at end of file
diff --git a/examples/widgets/calendarwidget/calendarwidget.desktop b/examples/widgets/calendarwidget/calendarwidget.desktop
new file mode 100644
index 0000000000..645dc412e3
--- /dev/null
+++ b/examples/widgets/calendarwidget/calendarwidget.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Calendar Widget
+Exec=/opt/usr/bin/calendarwidget
+Icon=calendarwidget
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/calendarwidget/calendarwidget.pro b/examples/widgets/calendarwidget/calendarwidget.pro
index ed311e2d08..5b0584d171 100644
--- a/examples/widgets/calendarwidget/calendarwidget.pro
+++ b/examples/widgets/calendarwidget/calendarwidget.pro
@@ -13,3 +13,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/widgets/charactermap/charactermap.desktop b/examples/widgets/charactermap/charactermap.desktop
new file mode 100644
index 0000000000..7f1919470a
--- /dev/null
+++ b/examples/widgets/charactermap/charactermap.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Character Map
+Exec=/opt/usr/bin/charactermap
+Icon=charactermap
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/charactermap/charactermap.pro b/examples/widgets/charactermap/charactermap.pro
index 54e9e6f63a..4baaac1b31 100644
--- a/examples/widgets/charactermap/charactermap.pro
+++ b/examples/widgets/charactermap/charactermap.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/codeeditor/codeeditor.desktop b/examples/widgets/codeeditor/codeeditor.desktop
new file mode 100644
index 0000000000..9347479e11
--- /dev/null
+++ b/examples/widgets/codeeditor/codeeditor.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Code Editor
+Exec=/opt/usr/bin/codeeditor
+Icon=codeeditor
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/codeeditor/codeeditor.pro b/examples/widgets/codeeditor/codeeditor.pro
index c32914c4d1..7ad747793c 100644
--- a/examples/widgets/codeeditor/codeeditor.pro
+++ b/examples/widgets/codeeditor/codeeditor.pro
@@ -8,3 +8,8 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/widgets/codeeditor
INSTALLS += target sources
QT += widgets
+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)
diff --git a/examples/widgets/codeeditor/main.cpp b/examples/widgets/codeeditor/main.cpp
index 1bce70e03f..8a893244df 100644
--- a/examples/widgets/codeeditor/main.cpp
+++ b/examples/widgets/codeeditor/main.cpp
@@ -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();
}
diff --git a/examples/widgets/digitalclock/digitalclock.desktop b/examples/widgets/digitalclock/digitalclock.desktop
new file mode 100644
index 0000000000..b13876878c
--- /dev/null
+++ b/examples/widgets/digitalclock/digitalclock.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Digital Clock
+Exec=/opt/usr/bin/digitalclock
+Icon=digitalclock
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/digitalclock/digitalclock.pro b/examples/widgets/digitalclock/digitalclock.pro
index 30a5fed019..9df216e855 100644
--- a/examples/widgets/digitalclock/digitalclock.pro
+++ b/examples/widgets/digitalclock/digitalclock.pro
@@ -10,3 +10,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/widgets/digitalclock/main.cpp b/examples/widgets/digitalclock/main.cpp
index c43162bade..d022918b2c 100644
--- a/examples/widgets/digitalclock/main.cpp
+++ b/examples/widgets/digitalclock/main.cpp
@@ -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();
}
diff --git a/examples/widgets/elidedlabel/elidedlabel.desktop b/examples/widgets/elidedlabel/elidedlabel.desktop
new file mode 100644
index 0000000000..5da3a6c15a
--- /dev/null
+++ b/examples/widgets/elidedlabel/elidedlabel.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Elided Label
+Exec=/opt/usr/bin/elidedlabel
+Icon=elidedlabel
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/elidedlabel/elidedlabel.pro b/examples/widgets/elidedlabel/elidedlabel.pro
new file mode 100644
index 0000000000..072cd2fb14
--- /dev/null
+++ b/examples/widgets/elidedlabel/elidedlabel.pro
@@ -0,0 +1,31 @@
+# Nokia Qt Examples: elided label example
+
+QT += core gui
+
+TARGET = elidedlabel
+TEMPLATE = app
+
+SOURCES += \
+ main.cpp\
+ testwidget.cpp \
+ elidedlabel.cpp
+
+HEADERS += \
+ testwidget.h \
+ elidedlabel.h
+
+CONFIG += mobility
+MOBILITY =
+
+symbian {
+ TARGET.UID3 = 0xE2728354 # randomly generated
+ TARGET.EPOCSTACKSIZE = 0x14000
+ TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+ 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)
diff --git a/examples/widgets/groupbox/groupbox.desktop b/examples/widgets/groupbox/groupbox.desktop
new file mode 100644
index 0000000000..8239bbf5d0
--- /dev/null
+++ b/examples/widgets/groupbox/groupbox.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Group Box
+Exec=/opt/usr/bin/groupbox
+Icon=groupbox
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/groupbox/groupbox.pro b/examples/widgets/groupbox/groupbox.pro
index 06afd2ac28..361c037d24 100644
--- a/examples/widgets/groupbox/groupbox.pro
+++ b/examples/widgets/groupbox/groupbox.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/groupbox/main.cpp b/examples/widgets/groupbox/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/widgets/groupbox/main.cpp
+++ b/examples/widgets/groupbox/main.cpp
@@ -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();
}
diff --git a/examples/widgets/icons/icons.desktop b/examples/widgets/icons/icons.desktop
new file mode 100644
index 0000000000..df90cc5e6f
--- /dev/null
+++ b/examples/widgets/icons/icons.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Icons
+Exec=/opt/usr/bin/icons
+Icon=icons
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/icons/icons.pro b/examples/widgets/icons/icons.pro
index 4cc3243dae..7cdd420219 100644
--- a/examples/widgets/icons/icons.pro
+++ b/examples/widgets/icons/icons.pro
@@ -26,3 +26,8 @@ wince*: {
DEPLOYMENT += imageFiles
}
QT += widgets
+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)
diff --git a/examples/widgets/icons/main.cpp b/examples/widgets/icons/main.cpp
index 923c1f8514..c1ba2bda40 100644
--- a/examples/widgets/icons/main.cpp
+++ b/examples/widgets/icons/main.cpp
@@ -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();
}
diff --git a/examples/widgets/imageviewer/imageviewer.desktop b/examples/widgets/imageviewer/imageviewer.desktop
new file mode 100644
index 0000000000..63f2408c38
--- /dev/null
+++ b/examples/widgets/imageviewer/imageviewer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Image Viewer
+Exec=/opt/usr/bin/imageviewer
+Icon=imageviewer
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/imageviewer/imageviewer.pro b/examples/widgets/imageviewer/imageviewer.pro
index 1f144e4013..94798d6969 100644
--- a/examples/widgets/imageviewer/imageviewer.pro
+++ b/examples/widgets/imageviewer/imageviewer.pro
@@ -10,7 +10,15 @@ 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
}
QT += widgets
+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)
diff --git a/examples/widgets/imageviewer/main.cpp b/examples/widgets/imageviewer/main.cpp
index 55a362a622..8d1a068c5a 100644
--- a/examples/widgets/imageviewer/main.cpp
+++ b/examples/widgets/imageviewer/main.cpp
@@ -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();
}
diff --git a/examples/widgets/lineedits/lineedits.desktop b/examples/widgets/lineedits/lineedits.desktop
new file mode 100644
index 0000000000..7d8dea3ec0
--- /dev/null
+++ b/examples/widgets/lineedits/lineedits.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Line Edits
+Exec=/opt/usr/bin/lineedits
+Icon=lineedits
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/lineedits/lineedits.pro b/examples/widgets/lineedits/lineedits.pro
index 84c166e565..f24f8e55f3 100644
--- a/examples/widgets/lineedits/lineedits.pro
+++ b/examples/widgets/lineedits/lineedits.pro
@@ -13,3 +13,8 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/widgets/lineedits/main.cpp b/examples/widgets/lineedits/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/widgets/lineedits/main.cpp
+++ b/examples/widgets/lineedits/main.cpp
@@ -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();
}
diff --git a/examples/widgets/maemovibration/buttonwidget.cpp b/examples/widgets/maemovibration/buttonwidget.cpp
new file mode 100644
index 0000000000..a723c31492
--- /dev/null
+++ b/examples/widgets/maemovibration/buttonwidget.cpp
@@ -0,0 +1,26 @@
+#include "buttonwidget.h"
+#include <QSignalMapper>
+#include <QGridLayout>
+#include <QPushButton>
+
+//! [0]
+ButtonWidget::ButtonWidget(QStringList texts, QWidget *parent)
+ : QWidget(parent)
+{
+ signalMapper = new QSignalMapper(this);
+
+ QGridLayout *gridLayout = new QGridLayout;
+ for (int i = 0; i < texts.size(); ++i) {
+ QPushButton *button = new QPushButton(texts[i]);
+ connect(button, SIGNAL(clicked()), signalMapper, SLOT(map()));
+ signalMapper->setMapping(button, texts[i]);
+ gridLayout->addWidget(button, i / 2, i % 2);
+ }
+
+ connect(signalMapper, SIGNAL(mapped(const QString &)),
+ this, SIGNAL(clicked(const QString &)));
+
+ setLayout(gridLayout);
+}
+//! [0]
+
diff --git a/examples/widgets/maemovibration/buttonwidget.h b/examples/widgets/maemovibration/buttonwidget.h
new file mode 100644
index 0000000000..6635c67782
--- /dev/null
+++ b/examples/widgets/maemovibration/buttonwidget.h
@@ -0,0 +1,24 @@
+#ifndef BUTTONWIDGET_H
+#define BUTTONWIDGET_H
+
+#include <QWidget>
+#include <QSignalMapper>
+
+//! [0]
+class ButtonWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ ButtonWidget(QStringList texts, QWidget *parent = 0);
+
+signals:
+ void clicked(const QString &text);
+
+private:
+ QSignalMapper *signalMapper;
+};
+//! [0]
+
+#endif // BUTTONWIDGET_H
+
diff --git a/examples/widgets/maemovibration/data/48x48/maemovibration.png b/examples/widgets/maemovibration/data/48x48/maemovibration.png
new file mode 100644
index 0000000000..f32e9ced99
--- /dev/null
+++ b/examples/widgets/maemovibration/data/48x48/maemovibration.png
Binary files differ
diff --git a/examples/widgets/maemovibration/data/64x64/maemovibration.png b/examples/widgets/maemovibration/data/64x64/maemovibration.png
new file mode 100644
index 0000000000..f09cf7c3c6
--- /dev/null
+++ b/examples/widgets/maemovibration/data/64x64/maemovibration.png
Binary files differ
diff --git a/examples/widgets/maemovibration/data/maemovibration.desktop b/examples/widgets/maemovibration/data/maemovibration.desktop
new file mode 100644
index 0000000000..a88ed4e0aa
--- /dev/null
+++ b/examples/widgets/maemovibration/data/maemovibration.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Name=Maemo Vibration
+Exec=/usr/bin/maemovibration
+Icon=maemovibration
+X-HildonDesk-ShowInToolbar=true
+X-Window-Icon=maemovibration
+X-Window-Icon-Dimmed=maemovibration
+X-Osso-Type=application/x-executable
+X-Osso-Service=com.nokia.maemovibration
diff --git a/examples/widgets/maemovibration/data/maemovibration.service b/examples/widgets/maemovibration/data/maemovibration.service
new file mode 100644
index 0000000000..1fab19f35c
--- /dev/null
+++ b/examples/widgets/maemovibration/data/maemovibration.service
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=com.nokia.maemovibration
+Exec=/usr/bin/maemovibration
diff --git a/examples/widgets/maemovibration/maemovibration.pro b/examples/widgets/maemovibration/maemovibration.pro
new file mode 100644
index 0000000000..5c645dd369
--- /dev/null
+++ b/examples/widgets/maemovibration/maemovibration.pro
@@ -0,0 +1,52 @@
+TARGET = maemovibration
+HEADERS += buttonwidget.h mcevibrator.h
+SOURCES += main.cpp buttonwidget.cpp mcevibrator.cpp
+
+# All generated files goes same directory
+OBJECTS_DIR = build
+MOC_DIR = build
+UI_DIR = build
+DESTDIR = build
+
+TEMPLATE = app
+CONFIG += debug
+QT=core gui
+
+maemo5 {
+ QT += dbus
+ CONFIG += link_pkgconfig
+ PKG_CONFIG += mce
+ INSTALLS += target
+ target.path = /usr/bin/
+
+ INSTALLS += desktop
+ desktop.path = /usr/share/applications/hildon
+ desktop.files = data/maemovibration.desktop
+
+ INSTALLS += service
+ service.path = /usr/share/dbus-1/services
+ service.files = data/maemovibration.service
+
+ INSTALLS += icon64
+ icon64.path = /usr/share/icons/hicolor/64x64/apps
+ icon64.files = data/64x64/maemovibration.png
+
+ #
+ # Targets for debian source and binary package creation
+ #
+ debian-src.commands = dpkg-buildpackage -S -r -us -uc -d
+ debian-bin.commands = dpkg-buildpackage -b -r -uc -d
+ debian-all.depends = debian-src debian-bin
+
+ #
+ # Clean all but Makefile
+ #
+ compiler_clean.commands = -$(DEL_FILE) $(TARGET)
+
+ QMAKE_EXTRA_TARGETS += debian-all debian-src debian-bin compiler_clean
+}
+
+!maemo5 {
+ error(The Maemo Vibration Example only works for the maemo target!)
+}
+
diff --git a/examples/widgets/maemovibration/main.cpp b/examples/widgets/maemovibration/main.cpp
new file mode 100644
index 0000000000..f81529b185
--- /dev/null
+++ b/examples/widgets/maemovibration/main.cpp
@@ -0,0 +1,44 @@
+
+#include "buttonwidget.h"
+#include "mcevibrator.h"
+
+#include <QtDebug>
+#include <QApplication>
+#include <QFile>
+#include <QTextStream>
+#include <QMessageBox>
+#include <QTextStream>
+
+#include <cstdlib>
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ QString path = MceVibrator::defaultMceFilePath;
+
+ QFile file(path);
+ QStringList names;
+ if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream stream(&file);
+ names = MceVibrator::parsePatternNames(stream);
+ file.close();
+ }
+
+ if (names.isEmpty()){
+ qDebug() << "Could not read vibration pattern names from " << path;
+ a.exit(-1);
+ }
+//! [0]
+
+//! [1]
+ ButtonWidget buttonWidget(names);
+ MceVibrator vibrator;
+ QObject::connect(&buttonWidget, SIGNAL(clicked(const QString &)),
+ &vibrator, SLOT(vibrate(const QString &)));
+ buttonWidget.show();
+
+ return a.exec();
+}
+//! [1]
+
diff --git a/examples/widgets/maemovibration/mcevibrator.cpp b/examples/widgets/maemovibration/mcevibrator.cpp
new file mode 100644
index 0000000000..be6415fa16
--- /dev/null
+++ b/examples/widgets/maemovibration/mcevibrator.cpp
@@ -0,0 +1,79 @@
+
+#include "mcevibrator.h"
+
+#include <QStringList>
+#include <QDebug>
+#include <QDBusConnection>
+#include <QDBusMessage>
+
+#include <mce/dbus-names.h>
+
+const char MceVibrator::defaultMceFilePath[] = "/etc/mce/mce.ini";
+
+//! [5]
+static void checkError(QDBusMessage &msg)
+{
+ if (msg.type() == QDBusMessage::ErrorMessage)
+ qDebug() << msg.errorName() << msg.errorMessage();
+}
+//! [5]
+
+//! [0]
+MceVibrator::MceVibrator(QObject *parent) :
+ QObject(parent),
+ mceInterface(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF,
+ QDBusConnection::systemBus())
+{
+ QDBusMessage reply = mceInterface.call(MCE_ENABLE_VIBRATOR);
+ checkError(reply);
+}
+//! [0]
+
+//! [3]
+MceVibrator::~MceVibrator()
+{
+ deactivate(lastPatternName);
+ QDBusMessage reply = mceInterface.call(MCE_DISABLE_VIBRATOR);
+ checkError(reply);
+}
+//! [3]
+
+//! [1]
+void MceVibrator::vibrate(const QString &patternName)
+{
+ deactivate(lastPatternName);
+ lastPatternName = patternName;
+ QDBusMessage reply = mceInterface.call(MCE_ACTIVATE_VIBRATOR_PATTERN, patternName);
+ checkError(reply);
+}
+//! [1]
+
+//! [2]
+void MceVibrator::deactivate(const QString &patternName)
+{
+ if (!patternName.isNull()) {
+ QDBusMessage reply = mceInterface.call(MCE_DEACTIVATE_VIBRATOR_PATTERN, patternName);
+ checkError(reply);
+ }
+}
+//! [2]
+
+//! [4]
+QStringList MceVibrator::parsePatternNames(QTextStream &stream)
+{
+ QStringList result;
+ QString line;
+
+ do {
+ line = stream.readLine();
+ if (line.startsWith(QLatin1String("VibratorPatterns="))) {
+ QString values = line.section('=', 1);
+ result = values.split(';');
+ break;
+ }
+ } while (!line.isNull());
+
+ return result;
+}
+//! [4]
+
diff --git a/examples/widgets/maemovibration/mcevibrator.h b/examples/widgets/maemovibration/mcevibrator.h
new file mode 100644
index 0000000000..5aac87d9c6
--- /dev/null
+++ b/examples/widgets/maemovibration/mcevibrator.h
@@ -0,0 +1,31 @@
+#ifndef MCEVIBRATOR_H
+#define MCEVIBRATOR_H
+
+#include <QObject>
+#include <QTextStream>
+#include <QDBusInterface>
+
+//! [0]
+class MceVibrator : public QObject
+{
+ Q_OBJECT
+public:
+ explicit MceVibrator(QObject *parent = 0);
+ ~MceVibrator();
+
+ static const char defaultMceFilePath[];
+ static QStringList parsePatternNames(QTextStream &stream);
+
+public slots:
+ void vibrate(const QString &patternName);
+
+private:
+ void deactivate(const QString &patternName);
+
+ QDBusInterface mceInterface;
+ QString lastPatternName;
+};
+//! [0]
+
+#endif // MCEVIBRATOR_H
+
diff --git a/examples/widgets/movie/main.cpp b/examples/widgets/movie/main.cpp
index 3863234936..b9a1c69914 100644
--- a/examples/widgets/movie/main.cpp
+++ b/examples/widgets/movie/main.cpp
@@ -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();
}
diff --git a/examples/widgets/movie/movie.desktop b/examples/widgets/movie/movie.desktop
new file mode 100644
index 0000000000..5c7ae21896
--- /dev/null
+++ b/examples/widgets/movie/movie.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Movie
+Exec=/opt/usr/bin/movie
+Icon=movie
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/movie/movie.pro b/examples/widgets/movie/movie.pro
index 0ec37f7825..adef12b4b2 100644
--- a/examples/widgets/movie/movie.pro
+++ b/examples/widgets/movie/movie.pro
@@ -18,3 +18,8 @@ wince*: {
}
QT += widgets
+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)
diff --git a/examples/widgets/orientation/image_a.png b/examples/widgets/orientation/image_a.png
new file mode 100644
index 0000000000..4a1a0d3252
--- /dev/null
+++ b/examples/widgets/orientation/image_a.png
Binary files differ
diff --git a/examples/widgets/orientation/image_b.png b/examples/widgets/orientation/image_b.png
new file mode 100644
index 0000000000..8722d1edee
--- /dev/null
+++ b/examples/widgets/orientation/image_b.png
Binary files differ
diff --git a/examples/widgets/orientation/image_c.png b/examples/widgets/orientation/image_c.png
new file mode 100644
index 0000000000..6c9304fda0
--- /dev/null
+++ b/examples/widgets/orientation/image_c.png
Binary files differ
diff --git a/examples/widgets/orientation/images.qrc b/examples/widgets/orientation/images.qrc
new file mode 100644
index 0000000000..b258291e6f
--- /dev/null
+++ b/examples/widgets/orientation/images.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>image_a.png</file>
+ <file>image_b.png</file>
+ <file>image_c.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/widgets/orientation/landscape.ui b/examples/widgets/orientation/landscape.ui
new file mode 100644
index 0000000000..4616c041dc
--- /dev/null
+++ b/examples/widgets/orientation/landscape.ui
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LandscapeUI</class>
+ <widget class="QWidget" name="LandscapeUI">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>514</width>
+ <height>265</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">font-weight: bold;</string>
+ </property>
+ <property name="text">
+ <string>Landscape mode</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="exitButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Exit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Choices</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QRadioButton" name="radioAButton">
+ <property name="text">
+ <string>Long description explaining choice A</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioBButton">
+ <property name="text">
+ <string>Long description explaining choice B</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="radioCButton">
+ <property name="text">
+ <string>Long description explaining choice C</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QWidget" name="choiceWidget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <buttongroups>
+ <buttongroup name="buttonGroup"/>
+ </buttongroups>
+</ui>
diff --git a/examples/widgets/orientation/main.cpp b/examples/widgets/orientation/main.cpp
new file mode 100644
index 0000000000..34b05d6a66
--- /dev/null
+++ b/examples/widgets/orientation/main.cpp
@@ -0,0 +1,15 @@
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+//! [0]
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+
+ MainWindow w;
+ w.showFullScreen();
+
+ return a.exec();
+}
+//! [0]
+
diff --git a/examples/widgets/orientation/mainwindow.cpp b/examples/widgets/orientation/mainwindow.cpp
new file mode 100644
index 0000000000..328af445c8
--- /dev/null
+++ b/examples/widgets/orientation/mainwindow.cpp
@@ -0,0 +1,75 @@
+#include "mainwindow.h"
+#include "ui_landscape.h"
+#include "ui_portrait.h"
+
+#include <QDesktopWidget>
+#include <QResizeEvent>
+
+//! [0]
+MainWindow::MainWindow(QWidget *parent) :
+ QWidget(parent),
+ landscapeWidget(0),
+ portraitWidget(0)
+{
+ landscapeWidget = new QWidget(this);
+ landscape.setupUi(landscapeWidget);
+
+ portraitWidget = new QWidget(this);
+ portrait.setupUi(portraitWidget);
+//! [0]
+
+//! [1]
+ connect(portrait.exitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(landscape.exitButton, SIGNAL(clicked()), this, SLOT(close()));
+ connect(landscape.buttonGroup, SIGNAL(buttonClicked(QAbstractButton*)),
+ this, SLOT(onRadioButtonClicked(QAbstractButton*)));
+
+ landscape.radioAButton->setChecked(true);
+ onRadioButtonClicked(landscape.radioAButton);
+//! [1]
+
+//! [2]
+#ifdef Q_WS_MAEMO_5
+ setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+#endif
+}
+//! [2]
+
+//! [3]
+void MainWindow::resizeEvent(QResizeEvent *event)
+{
+ QSize size = event->size();
+ bool isLandscape = size.width() > size.height();
+
+ if (!isLandscape)
+ size.transpose();
+
+ landscapeWidget->setFixedSize(size);
+ size.transpose();
+ portraitWidget->setFixedSize(size);
+
+ landscapeWidget->setVisible(isLandscape);
+ portraitWidget->setVisible(!isLandscape);
+}
+//! [3]
+
+//! [4]
+void MainWindow::onRadioButtonClicked(QAbstractButton *button)
+{
+ QString styleTemplate = "background-image: url(:/image_%1.png);"
+ "background-repeat: no-repeat;"
+ "background-position: center center";
+
+ QString imageStyle("");
+ if (button == landscape.radioAButton)
+ imageStyle = styleTemplate.arg("a");
+ else if (button == landscape.radioBButton)
+ imageStyle = styleTemplate.arg("b");
+ else if (button == landscape.radioCButton)
+ imageStyle = styleTemplate.arg("c");
+
+ portrait.choiceWidget->setStyleSheet(imageStyle);
+ landscape.choiceWidget->setStyleSheet(imageStyle);
+}
+//! [4]
+
diff --git a/examples/widgets/orientation/mainwindow.h b/examples/widgets/orientation/mainwindow.h
new file mode 100644
index 0000000000..7c2546d4c4
--- /dev/null
+++ b/examples/widgets/orientation/mainwindow.h
@@ -0,0 +1,33 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QWidget>
+
+#include "ui_landscape.h"
+#include "ui_portrait.h"
+
+class QAbstractButton;
+
+//! [0]
+class MainWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+
+private slots:
+ void onRadioButtonClicked(QAbstractButton *button);
+
+private:
+ Ui::LandscapeUI landscape;
+ Ui::PortraitUI portrait;
+ QWidget *landscapeWidget;
+ QWidget *portraitWidget;
+};
+//! [0]
+
+#endif // MAINWINDOW_H
diff --git a/examples/widgets/orientation/orientation.desktop b/examples/widgets/orientation/orientation.desktop
new file mode 100644
index 0000000000..7bbf5584d3
--- /dev/null
+++ b/examples/widgets/orientation/orientation.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Orientation
+Exec=/opt/usr/bin/orientation
+Icon=orientation
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/orientation/orientation.pro b/examples/widgets/orientation/orientation.pro
new file mode 100644
index 0000000000..c146322635
--- /dev/null
+++ b/examples/widgets/orientation/orientation.pro
@@ -0,0 +1,30 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-08-04T10:27:31
+#
+#-------------------------------------------------
+
+QT += core gui
+
+TARGET = orientation
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+ mainwindow.cpp
+
+HEADERS += mainwindow.h
+
+FORMS += \
+ portrait.ui \
+ landscape.ui
+
+RESOURCES += \
+ images.qrc
+
+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)
diff --git a/examples/widgets/orientation/portrait.ui b/examples/widgets/orientation/portrait.ui
new file mode 100644
index 0000000000..31a55aff73
--- /dev/null
+++ b/examples/widgets/orientation/portrait.ui
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PortraitUI</class>
+ <widget class="QWidget" name="PortraitUI">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>201</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="styleSheet">
+ <string notr="true">font-weight: bold;</string>
+ </property>
+ <property name="text">
+ <string>Portrait mode</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QPushButton" name="exitButton">
+ <property name="text">
+ <string>Exit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="helpLabel">
+ <property name="text">
+ <string>Switch to landscape mode. In landscape mode you can change visible image.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QWidget" name="choiceWidget" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/widgets/scribble/main.cpp b/examples/widgets/scribble/main.cpp
index 01c8adae53..dffe80348a 100644
--- a/examples/widgets/scribble/main.cpp
+++ b/examples/widgets/scribble/main.cpp
@@ -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();
}
diff --git a/examples/widgets/scribble/scribble.desktop b/examples/widgets/scribble/scribble.desktop
new file mode 100644
index 0000000000..9c1ee0c482
--- /dev/null
+++ b/examples/widgets/scribble/scribble.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Scribble
+Exec=/opt/usr/bin/scribble
+Icon=scribble
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/scribble/scribble.pro b/examples/widgets/scribble/scribble.pro
index 0ad1311491..bf0363c137 100644
--- a/examples/widgets/scribble/scribble.pro
+++ b/examples/widgets/scribble/scribble.pro
@@ -12,3 +12,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/widgets/shapedclock/main.cpp b/examples/widgets/shapedclock/main.cpp
index 9b7f951a48..f5e9718d4f 100644
--- a/examples/widgets/shapedclock/main.cpp
+++ b/examples/widgets/shapedclock/main.cpp
@@ -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();
}
diff --git a/examples/widgets/shapedclock/shapedclock.desktop b/examples/widgets/shapedclock/shapedclock.desktop
new file mode 100644
index 0000000000..bae58e30d5
--- /dev/null
+++ b/examples/widgets/shapedclock/shapedclock.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Shaped Clock
+Exec=/opt/usr/bin/shapedclock
+Icon=shapedclock
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/shapedclock/shapedclock.pro b/examples/widgets/shapedclock/shapedclock.pro
index f0c80b25bd..8c3cb76e5a 100644
--- a/examples/widgets/shapedclock/shapedclock.pro
+++ b/examples/widgets/shapedclock/shapedclock.pro
@@ -13,3 +13,7 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+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)
diff --git a/examples/widgets/sliders/main.cpp b/examples/widgets/sliders/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/widgets/sliders/main.cpp
+++ b/examples/widgets/sliders/main.cpp
@@ -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();
}
diff --git a/examples/widgets/sliders/sliders.desktop b/examples/widgets/sliders/sliders.desktop
new file mode 100644
index 0000000000..bc8904317b
--- /dev/null
+++ b/examples/widgets/sliders/sliders.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Sliders
+Exec=/opt/usr/bin/sliders
+Icon=sliders
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/sliders/sliders.pro b/examples/widgets/sliders/sliders.pro
index adc70cfec7..7361ba1ed3 100644
--- a/examples/widgets/sliders/sliders.pro
+++ b/examples/widgets/sliders/sliders.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/softkeys/softkeys.desktop b/examples/widgets/softkeys/softkeys.desktop
new file mode 100644
index 0000000000..7f4993a588
--- /dev/null
+++ b/examples/widgets/softkeys/softkeys.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Soft Keys
+Exec=/opt/usr/bin/softkeys
+Icon=softkeys
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/softkeys/softkeys.pro b/examples/widgets/softkeys/softkeys.pro
index 4073a29d8e..f9eca7f994 100644
--- a/examples/widgets/softkeys/softkeys.pro
+++ b/examples/widgets/softkeys/softkeys.pro
@@ -14,3 +14,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/widgets/spinboxes/main.cpp b/examples/widgets/spinboxes/main.cpp
index f2079f511b..4a43828d45 100644
--- a/examples/widgets/spinboxes/main.cpp
+++ b/examples/widgets/spinboxes/main.cpp
@@ -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();
}
diff --git a/examples/widgets/spinboxes/spinboxes.desktop b/examples/widgets/spinboxes/spinboxes.desktop
new file mode 100644
index 0000000000..7de30383f2
--- /dev/null
+++ b/examples/widgets/spinboxes/spinboxes.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Spin Boxes
+Exec=/opt/usr/bin/spinboxes
+Icon=spinboxes
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/spinboxes/spinboxes.pro b/examples/widgets/spinboxes/spinboxes.pro
index 9c9a001e7c..11d5aa1d41 100644
--- a/examples/widgets/spinboxes/spinboxes.pro
+++ b/examples/widgets/spinboxes/spinboxes.pro
@@ -10,3 +10,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/styles/styles.desktop b/examples/widgets/styles/styles.desktop
new file mode 100644
index 0000000000..fb9ef42994
--- /dev/null
+++ b/examples/widgets/styles/styles.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Styles
+Exec=/opt/usr/bin/styles
+Icon=styles
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/styles/styles.pro b/examples/widgets/styles/styles.pro
index 8c0eb25629..a3d0e92ee8 100644
--- a/examples/widgets/styles/styles.pro
+++ b/examples/widgets/styles/styles.pro
@@ -15,3 +15,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/stylesheet/main.cpp b/examples/widgets/stylesheet/main.cpp
index 2c05ee950d..6259969f2d 100644
--- a/examples/widgets/stylesheet/main.cpp
+++ b/examples/widgets/stylesheet/main.cpp
@@ -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();
}
diff --git a/examples/widgets/stylesheet/stylesheet.desktop b/examples/widgets/stylesheet/stylesheet.desktop
new file mode 100644
index 0000000000..0550b19ba2
--- /dev/null
+++ b/examples/widgets/stylesheet/stylesheet.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Style Sheet
+Exec=/opt/usr/bin/stylesheet
+Icon=stylesheet
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/stylesheet/stylesheet.pro b/examples/widgets/stylesheet/stylesheet.pro
index 6ab994598c..7d699a654f 100644
--- a/examples/widgets/stylesheet/stylesheet.pro
+++ b/examples/widgets/stylesheet/stylesheet.pro
@@ -15,3 +15,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/symbianvibration/main.cpp b/examples/widgets/symbianvibration/main.cpp
new file mode 100644
index 0000000000..015ed546c7
--- /dev/null
+++ b/examples/widgets/symbianvibration/main.cpp
@@ -0,0 +1,14 @@
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+#if defined(Q_WS_S60)
+ w.showMaximized();
+#else
+ w.show();
+#endif
+ return a.exec();
+}
diff --git a/examples/widgets/symbianvibration/mainwindow.cpp b/examples/widgets/symbianvibration/mainwindow.cpp
new file mode 100644
index 0000000000..67cf2204b2
--- /dev/null
+++ b/examples/widgets/symbianvibration/mainwindow.cpp
@@ -0,0 +1,23 @@
+#include <QtGui/QMenuBar>
+#include "mainwindow.h"
+#include "vibrationsurface.h"
+#include "XQVibra.h"
+
+//! [0]
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ vibra = new XQVibra(this);
+ setCentralWidget(new VibrationSurface(vibra, this));
+ menuBar()->addAction(tr("Vibrate"), this, SLOT(vibrate()));
+}
+//! [0]
+
+//! [1]
+void MainWindow::vibrate()
+{
+ vibra->setIntensity(75);
+ vibra->start(2500);
+}
+//! [1]
+
diff --git a/examples/widgets/symbianvibration/mainwindow.h b/examples/widgets/symbianvibration/mainwindow.h
new file mode 100644
index 0000000000..cc77f7bd29
--- /dev/null
+++ b/examples/widgets/symbianvibration/mainwindow.h
@@ -0,0 +1,23 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+class XQVibra;
+
+//! [0]
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+private slots:
+ void vibrate();
+
+private:
+ XQVibra *vibra;
+};
+//! [0]
+
+#endif // MAINWINDOW_H
diff --git a/examples/widgets/symbianvibration/symbianvibration.pro b/examples/widgets/symbianvibration/symbianvibration.pro
new file mode 100644
index 0000000000..d99b76d9e1
--- /dev/null
+++ b/examples/widgets/symbianvibration/symbianvibration.pro
@@ -0,0 +1,39 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2010-06-14T10:09:27
+#
+#-------------------------------------------------
+
+QT += core gui
+
+TARGET = symbianvibration
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+ mainwindow.cpp \
+ vibrationsurface.cpp \
+ xqvibra.cpp \
+ xqvibra_p.cpp
+
+HEADERS += mainwindow.h \
+ vibrationsurface.h \
+ xqvibra.h \
+ xqvibra_p.h
+
+CONFIG += mobility
+MOBILITY =
+
+symbian {
+ TARGET.UID3 = 0xecf47018
+ # TARGET.CAPABILITY +=
+ TARGET.EPOCSTACKSIZE = 0x14000
+ TARGET.EPOCHEAPSIZE = 0x020000 0x800000
+ LIBS += -lhwrmvibraclient
+ include($$PWD/../../symbianpkgrules.pri)
+}
+
+!symbian {
+ error(The Symbian Vibration Example only works for the Symbian target!)
+}
+
diff --git a/examples/widgets/symbianvibration/vibrationsurface.cpp b/examples/widgets/symbianvibration/vibrationsurface.cpp
new file mode 100644
index 0000000000..5e2e962bad
--- /dev/null
+++ b/examples/widgets/symbianvibration/vibrationsurface.cpp
@@ -0,0 +1,117 @@
+#include "vibrationsurface.h"
+#include <QtGui/QPainter>
+#include <QtCore/QLine>
+#include <QtGui/QMouseEvent>
+#include <QtGui/QScreen>
+#include <QtCore/QRect>
+#include <QtGui/QColor>
+
+#include "xqvibra.h"
+
+//! [4]
+const int NumberOfLevels = 10;
+const double IntensityFactor = XQVibra::MaxIntensity / NumberOfLevels;
+//! [4]
+
+VibrationSurface::VibrationSurface(XQVibra *vibra, QWidget *parent) :
+ QWidget(parent),
+ vibra(vibra),
+ lastIntensity(0)
+{
+}
+
+//! [0]
+void VibrationSurface::mousePressEvent(QMouseEvent *event)
+{
+ applyIntensity(event->x(), event->y());
+ vibra->start();
+}
+//! [0]
+
+//! [1]
+void VibrationSurface::mouseMoveEvent(QMouseEvent *event)
+{
+ applyIntensity(event->x(), event->y());
+}
+//! [1]
+
+//! [2]
+void VibrationSurface::mouseReleaseEvent(QMouseEvent *)
+{
+ vibra->stop();
+}
+//! [2]
+
+//! [5]
+void VibrationSurface::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ QRect rect = geometry();
+ int dx = 0, dy = 0;
+
+ if (height() > width()) {
+ dy = height() / NumberOfLevels;
+ rect.setHeight(dy);
+ } else {
+ dx = width() / NumberOfLevels;
+ rect.setWidth(dx);
+ }
+//! [5]
+//! [6]
+ for (int i = 0; i < NumberOfLevels; i++) {
+ int x = i * dx;
+ int y = i * dy;
+ int intensity = getIntensity(x, y);
+ QColor color = QColor(40, 80, 10).lighter(100 + intensity);
+
+ rect.moveTo(x, y);
+ painter.fillRect(rect, color);
+ painter.setPen(color.darker());
+ painter.drawText(rect, Qt::AlignCenter, QString::number(intensity));
+ }
+}
+//! [6]
+
+//! [7]
+int VibrationSurface::getIntensity(int x, int y)
+{
+ int level;
+ int coord;
+
+ if (height() > width()) {
+ level = height() / NumberOfLevels;
+ coord = y;
+ } else {
+ level = width() / NumberOfLevels;
+ coord = x;
+ }
+
+ if (level == 0) {
+ return 0;
+ }
+//! [7]
+//! [8]
+ int intensity = (coord / level + 1) * IntensityFactor;
+
+ if (intensity < 0) {
+ intensity = 0;
+ } else if (intensity > XQVibra::MaxIntensity) {
+ intensity = XQVibra::MaxIntensity;
+ }
+
+ return intensity;
+}
+//! [8]
+
+//! [3]
+void VibrationSurface::applyIntensity(int x, int y)
+{
+ int intensity = getIntensity(x, y);
+
+ if (intensity != lastIntensity) {
+ vibra->setIntensity(intensity);
+ lastIntensity = intensity;
+ }
+}
+//! [3]
+
diff --git a/examples/widgets/symbianvibration/vibrationsurface.h b/examples/widgets/symbianvibration/vibrationsurface.h
new file mode 100644
index 0000000000..eee6291658
--- /dev/null
+++ b/examples/widgets/symbianvibration/vibrationsurface.h
@@ -0,0 +1,31 @@
+#ifndef TOUCHAREA_H
+#define TOUCHAREA_H
+
+#include <QWidget>
+
+class XQVibra;
+
+//! [0]
+class VibrationSurface : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit VibrationSurface(XQVibra *vibra, QWidget *parent = 0);
+
+protected:
+ virtual void mousePressEvent(QMouseEvent *);
+ virtual void mouseMoveEvent(QMouseEvent *);
+ virtual void mouseReleaseEvent(QMouseEvent *);
+ virtual void paintEvent(QPaintEvent *);
+
+private:
+
+ int getIntensity(int x, int y);
+ void applyIntensity(int x, int y);
+
+ XQVibra *vibra;
+ int lastIntensity;
+};
+//! [0]
+
+#endif // TOUCHAREA_H
diff --git a/examples/widgets/symbianvibration/xqvibra.cpp b/examples/widgets/symbianvibration/xqvibra.cpp
new file mode 100644
index 0000000000..1263c3e0e4
--- /dev/null
+++ b/examples/widgets/symbianvibration/xqvibra.cpp
@@ -0,0 +1,170 @@
+#include "xqvibra.h"
+#include "xqvibra_p.h"
+
+/*!
+ \class XQVibra
+
+ \brief The XQVibra class is used to control the device's vibra. The XQVibra
+ class provides also information of vibration setting in the user profile.
+
+ Example:
+ \code
+ XQVibra *vibra = new XQVibra(this);
+ QPushButton *startButton = new QPushButton(this);
+ QPushButton *stopButton = new QPushButton(this);
+ connect(startButton, SIGNAL(clicked()), vibra, SLOT(start()));
+ connect(stopButton, SIGNAL(clicked()), vibra, SLOT(stop()));
+ \endcode
+*/
+
+/*! \var XQVibra::InfiniteDuration
+ With this constant vibration can be set to work indefinitely (Note! Depends on the HW)
+*/
+/*! \var XQVibra::MaxIntensity
+ Maximum intensity as percentages
+*/
+/*! \var XQVibra::MinIntensity
+ Minumum intensity as percentages
+*/
+
+/*!
+ Constructs a XQVibra object with the given parent.
+ Call error() to get a value of XQVibra::Error that indicates which error occurred during initialisation if any.
+ \sa start(), setIntensity(), error()
+*/
+XQVibra::XQVibra(QObject *parent)
+ : QObject(parent), d(new XQVibraPrivate(this))
+{
+}
+
+/*!
+ Destroys the XQVibra object.
+*/
+XQVibra::~XQVibra()
+{
+ delete d;
+}
+
+/*!
+ \enum XQVibra::Error
+
+ This enum defines the possible errors for a XQVibra object.
+*/
+/*! \var XQVibra::Error XQVibra::NoError
+ No error occured.
+*/
+/*! \var XQVibra::Error XQVibra::OutOfMemoryError
+ Not enough memory.
+*/
+/*! \var XQVibra::Error XQVibra::ArgumentError
+ Duration is invalid.
+*/
+/*! \var XQVibra::Error XQVibra::VibraInUseError
+ Vibra is already in used by other client.
+*/
+/*! \var XQVibra::Error XQVibra::HardwareError
+ There is a hardware error.
+*/
+/*! \var XQVibra::Error XQVibra::TimeOutError
+ Timeout occurred in controlling vibra.
+*/
+/*! \var XQVibra::Error XQVibra::VibraLockedError
+ Vibra is locked down because too much continuous use or explicitly blocked by
+ for example some vibration sensitive accessory.
+*/
+/*! \var XQVibra::Error XQVibra::AccessDeniedError
+ Vibration setting in the user profile is not set.
+*/
+/*! \var XQVibra::Error XQVibra::UnknownError
+ Unknown error.
+*/
+
+/*!
+ \enum XQVibra::Status
+
+ This enum defines the possible statuses of the vibration
+*/
+/*! \var XQVibra::Status XQVibra::StatusNotAllowed
+ Vibra is set off in the user profile or status is unknow
+*/
+/*! \var XQVibra::Status XQVibra::StatusOff
+ Vibration is non-active
+*/
+/*! \var XQVibra::Status XQVibra::StatusOn
+ Vibration is active
+*/
+
+/*!
+ Starts vibrating. If duration hasn't been set the vibration continues
+ indefinitely unless stopped with stop() function. Calling the start while vibration
+ is active the active vibration is interrupted and the new vibration starts immediately.
+
+ \param duration Specifies duration how long vibration should last
+ \return If false is returned, an error has occurred. Call error() to get a value of
+ XQVibra::Error that indicates which error occurred
+ \sa stop(), setIntensity(), error()
+*/
+bool XQVibra::start(int duration)
+{
+ return d->start(duration);
+}
+
+/*!
+ Interrupts the device vibration immediately.
+
+ \return If false is returned, an error has occurred. Call error() to get a value of
+ XQVibra::Error that indicates which error occurred
+ \sa start(), setIntensity(), error()
+*/
+bool XQVibra::stop()
+{
+ return d->stop();
+}
+
+/*!
+ Sets the intensity of the vibration. Allowed values for the intensity are
+ between -100 and 100. 0 means no vibrating. NOTE: The device might have
+ hardware-imposed limits on supported vibra intensity values, so actual
+ effect might vary between different hardware.
+
+ \param intensity Intensity of the vibra in decimals
+ \return If false is returned, an error has occurred. Call error() to get a value of
+ XQVibra::Error that indicates which error occurred
+ \sa error()
+*/
+bool XQVibra::setIntensity(int intensity)
+{
+ return d->setIntensity(intensity);
+}
+
+/*!
+ Returns the current status of the vibration. This function can be used to check has vibration
+ allowed in the user profile.
+
+ \return current status
+ \sa statusChanged()
+*/
+XQVibra::Status XQVibra::currentStatus() const
+{
+ return d->currentStatus();
+}
+
+/*!
+ Returns the type of error that occurred if the latest function call failed; otherwise returns NoError
+ \return Error code
+*/
+XQVibra::Error XQVibra::error() const
+{
+ return d->error();
+}
+
+/*!
+ \fn void XQVibra::statusChanged(Status status)
+
+ This signal is emitted when the there is a change of the vibration status.
+
+ \param status a vibration status
+ \sa currentStatus()
+*/
+
+// End of file
diff --git a/examples/widgets/symbianvibration/xqvibra.h b/examples/widgets/symbianvibration/xqvibra.h
new file mode 100644
index 0000000000..5520d08a06
--- /dev/null
+++ b/examples/widgets/symbianvibration/xqvibra.h
@@ -0,0 +1,61 @@
+#ifndef XQVIBRA_H
+#define XQVIBRA_H
+
+// INCLUDES
+#include <QObject>
+
+// FORWARD DECLARATIONS
+class XQVibraPrivate;
+
+// CLASS DECLARATION
+//! [0]
+class XQVibra : public QObject
+{
+ Q_OBJECT
+
+public:
+ static const int InfiniteDuration = 0;
+ static const int MaxIntensity = 100;
+ static const int MinIntensity = -100;
+
+ enum Error {
+ NoError = 0,
+ OutOfMemoryError,
+ ArgumentError,
+ VibraInUseError,
+ HardwareError,
+ TimeOutError,
+ VibraLockedError,
+ AccessDeniedError,
+ UnknownError = -1
+ };
+
+ enum Status {
+ StatusNotAllowed = 0,
+ StatusOff,
+ StatusOn
+ };
+
+ XQVibra(QObject *parent = 0);
+ ~XQVibra();
+
+ XQVibra::Status currentStatus() const;
+ XQVibra::Error error() const;
+
+Q_SIGNALS:
+ void statusChanged(XQVibra::Status status);
+
+public Q_SLOTS:
+ bool start(int duration = InfiniteDuration);
+ bool stop();
+ bool setIntensity(int intensity);
+
+private:
+ friend class XQVibraPrivate;
+ XQVibraPrivate *d;
+};
+//! [0]
+
+#endif // XQVIBRA_H
+
+// End of file
diff --git a/examples/widgets/symbianvibration/xqvibra_p.cpp b/examples/widgets/symbianvibration/xqvibra_p.cpp
new file mode 100644
index 0000000000..9f2b5f97b4
--- /dev/null
+++ b/examples/widgets/symbianvibration/xqvibra_p.cpp
@@ -0,0 +1,131 @@
+#include "xqvibra_p.h"
+
+const int KDefaultIntensity = 0xFF;
+
+XQVibraPrivate::XQVibraPrivate(XQVibra *vibra)
+ : q(vibra), iStatus(XQVibra::StatusOff), iDuration(XQVibra::InfiniteDuration), iIntensity(KDefaultIntensity)
+
+{
+ TRAP(iError, iVibra = CHWRMVibra::NewL();)
+ QObject::connect(&iTimer, SIGNAL(timeout()), q, SLOT(stop()));
+}
+
+XQVibraPrivate::~XQVibraPrivate()
+{
+ delete iVibra;
+}
+
+bool XQVibraPrivate::start(int aDuration)
+{
+ iDuration = aDuration;
+ TRAP(iError,
+ if (iIntensity == KDefaultIntensity) {
+ iVibra->StartVibraL(XQVibra::InfiniteDuration);
+ } else {
+ iVibra->StopVibraL();
+ iVibra->StartVibraL(XQVibra::InfiniteDuration, iIntensity);
+ }
+
+ if (aDuration != XQVibra::InfiniteDuration) {
+ iTimer.start(aDuration);
+ } else {
+ iTimer.stop();
+ }
+
+ if (iStatus != XQVibra::StatusOn) {
+ iStatus = XQVibra::StatusOn;
+ emit q->statusChanged(iStatus);
+ }
+ )
+ return (iError == KErrNone);
+}
+
+bool XQVibraPrivate::stop()
+{
+ TRAP(iError,
+ if (iVibra->VibraStatus() == CHWRMVibra::EVibraStatusOn) {
+ iVibra->StopVibraL();
+ if (iTimer.isActive()) {
+ iTimer.stop();
+ }
+ }
+
+ iStatus = XQVibra::StatusOff;
+ emit q->statusChanged(iStatus);
+ )
+ return (iError == KErrNone);
+}
+
+void XQVibraPrivate::VibraModeChanged(CHWRMVibra::TVibraModeState /*aStatus*/)
+{
+ // Implementation isn't needed here because this information isn't used in the public side of the extension
+}
+
+void XQVibraPrivate::VibraStatusChanged(CHWRMVibra::TVibraStatus aStatus)
+{
+ if (aStatus == CHWRMVibra::EVibraStatusUnknown ||
+ aStatus == CHWRMVibra::EVibraStatusNotAllowed) {
+ iStatus = XQVibra::StatusNotAllowed;
+ emit q->statusChanged(iStatus);
+ }
+
+ if (iDuration == XQVibra::InfiniteDuration) {
+ if (iStatus != XQVibra::StatusOff) {
+ iStatus = XQVibra::StatusOff;
+ emit q->statusChanged(iStatus);
+ }
+ }
+}
+
+bool XQVibraPrivate::setIntensity(int aIntensity)
+{
+ TRAP(iError,
+ if (aIntensity >= KHWRMVibraMinIntensity && aIntensity <= KHWRMVibraMaxIntensity) {
+ iIntensity = aIntensity;
+ if (iIntensity == 0 && iStatus == XQVibra::StatusOn) {
+ iVibra->StopVibraL();
+ } else if (iStatus == XQVibra::StatusOn) {
+ iVibra->StopVibraL();
+ iVibra->StartVibraL(XQVibra::InfiniteDuration, iIntensity);
+ }
+ } else {
+ User::Leave(KErrArgument);
+ }
+ )
+ return (iError == KErrNone);
+}
+
+XQVibra::Status XQVibraPrivate::currentStatus() const
+{
+ if (iVibra->VibraStatus() == CHWRMVibra::EVibraStatusUnknown ||
+ iVibra->VibraStatus() == CHWRMVibra::EVibraStatusNotAllowed) {
+ return XQVibra::StatusNotAllowed;
+ }
+ return iStatus;
+}
+
+XQVibra::Error XQVibraPrivate::error() const
+{
+ switch (iError) {
+ case KErrNone:
+ return XQVibra::NoError;
+ case KErrNoMemory:
+ return XQVibra::OutOfMemoryError;
+ case KErrArgument:
+ return XQVibra::ArgumentError;
+ case KErrInUse:
+ return XQVibra::VibraInUseError;
+ case KErrGeneral:
+ return XQVibra::HardwareError;
+ case KErrTimedOut:
+ return XQVibra::TimeOutError;
+ case KErrLocked:
+ return XQVibra::VibraLockedError;
+ case KErrAccessDenied:
+ return XQVibra::AccessDeniedError;
+ default:
+ return XQVibra::UnknownError;
+ }
+}
+
+// End of file
diff --git a/examples/widgets/symbianvibration/xqvibra_p.h b/examples/widgets/symbianvibration/xqvibra_p.h
new file mode 100644
index 0000000000..7b4e9d83d0
--- /dev/null
+++ b/examples/widgets/symbianvibration/xqvibra_p.h
@@ -0,0 +1,39 @@
+#ifndef XQVIBRA_P_H
+#define XQVIBRA_P_H
+
+// INCLUDES
+#include "xqvibra.h"
+#include <HWRMVibra.h>
+#include <QTimer>
+
+// CLASS DECLARATION
+class XQVibraPrivate: public CBase, public MHWRMVibraObserver
+{
+
+public:
+ XQVibraPrivate(XQVibra *vibra);
+ ~XQVibraPrivate();
+
+ bool start(int aDuration = XQVibra::InfiniteDuration);
+ bool stop();
+ bool setIntensity(int aIntensity);
+ XQVibra::Status currentStatus() const;
+ XQVibra::Error error() const;
+
+private: // From MHWRMVibraObserver
+ void VibraModeChanged(CHWRMVibra::TVibraModeState aStatus);
+ void VibraStatusChanged(CHWRMVibra::TVibraStatus aStatus);
+
+private:
+ XQVibra *q;
+ XQVibra::Status iStatus;
+ CHWRMVibra *iVibra;
+ QTimer iTimer;
+ int iDuration;
+ int iIntensity;
+ int iError;
+};
+
+#endif /*XQVIBRA_P_H*/
+
+// End of file
diff --git a/examples/widgets/tablet/main.cpp b/examples/widgets/tablet/main.cpp
index f7524b2f48..a7a054a666 100644
--- a/examples/widgets/tablet/main.cpp
+++ b/examples/widgets/tablet/main.cpp
@@ -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]
diff --git a/examples/widgets/tablet/tablet.desktop b/examples/widgets/tablet/tablet.desktop
new file mode 100644
index 0000000000..9b40dc25d4
--- /dev/null
+++ b/examples/widgets/tablet/tablet.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Tablet
+Exec=/opt/usr/bin/tablet
+Icon=tablet
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/tablet/tablet.pro b/examples/widgets/tablet/tablet.pro
index a724703a81..4788fad2c7 100644
--- a/examples/widgets/tablet/tablet.pro
+++ b/examples/widgets/tablet/tablet.pro
@@ -14,3 +14,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/tetrix/main.cpp b/examples/widgets/tetrix/main.cpp
index 6c30ae5cae..b10764387a 100644
--- a/examples/widgets/tetrix/main.cpp
+++ b/examples/widgets/tetrix/main.cpp
@@ -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();
}
diff --git a/examples/widgets/tetrix/tetrix.desktop b/examples/widgets/tetrix/tetrix.desktop
new file mode 100644
index 0000000000..4d7a3de417
--- /dev/null
+++ b/examples/widgets/tetrix/tetrix.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Tetrix
+Exec=/opt/usr/bin/tetrix
+Icon=tetrix
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/tetrix/tetrix.pro b/examples/widgets/tetrix/tetrix.pro
index fea2951dc8..827769ed30 100644
--- a/examples/widgets/tetrix/tetrix.pro
+++ b/examples/widgets/tetrix/tetrix.pro
@@ -17,3 +17,5 @@ symbian {
CONFIG += qt_example
}
QT += widgets
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/widgets/tooltips/main.cpp b/examples/widgets/tooltips/main.cpp
index 893b65da86..5fba6cc1d6 100644
--- a/examples/widgets/tooltips/main.cpp
+++ b/examples/widgets/tooltips/main.cpp
@@ -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();
}
diff --git a/examples/widgets/tooltips/tooltips.desktop b/examples/widgets/tooltips/tooltips.desktop
new file mode 100644
index 0000000000..7dade26cc3
--- /dev/null
+++ b/examples/widgets/tooltips/tooltips.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Tool Tips
+Exec=/opt/usr/bin/tooltips
+Icon=tooltips
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/tooltips/tooltips.pro b/examples/widgets/tooltips/tooltips.pro
index 467478ce0d..c2c91ba891 100644
--- a/examples/widgets/tooltips/tooltips.pro
+++ b/examples/widgets/tooltips/tooltips.pro
@@ -13,3 +13,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/widgets/validators/main.cpp b/examples/widgets/validators/main.cpp
index 5e5765e957..748a36125d 100644
--- a/examples/widgets/validators/main.cpp
+++ b/examples/widgets/validators/main.cpp
@@ -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();
}
diff --git a/examples/widgets/validators/validators.desktop b/examples/widgets/validators/validators.desktop
new file mode 100644
index 0000000000..073131632f
--- /dev/null
+++ b/examples/widgets/validators/validators.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Validators
+Exec=/opt/usr/bin/validators
+Icon=validators
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/validators/validators.pro b/examples/widgets/validators/validators.pro
index 36d069b7c3..406a5f442a 100644
--- a/examples/widgets/validators/validators.pro
+++ b/examples/widgets/validators/validators.pro
@@ -22,3 +22,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/widgets/widgets.pro b/examples/widgets/widgets.pro
index 552e6267d4..232657eabe 100644
--- a/examples/widgets/widgets.pro
+++ b/examples/widgets/widgets.pro
@@ -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
@@ -42,3 +48,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp
index 91cd1b8c4b..0b9222864f 100644
--- a/examples/widgets/wiggly/main.cpp
+++ b/examples/widgets/wiggly/main.cpp
@@ -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)
diff --git a/examples/widgets/wiggly/wiggly.desktop b/examples/widgets/wiggly/wiggly.desktop
new file mode 100644
index 0000000000..b83e1ab3f0
--- /dev/null
+++ b/examples/widgets/wiggly/wiggly.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Wiggly
+Exec=/opt/usr/bin/wiggly
+Icon=wiggly
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/wiggly/wiggly.pro b/examples/widgets/wiggly/wiggly.pro
index d0d8dc7b9d..ec0e0a80b0 100644
--- a/examples/widgets/wiggly/wiggly.pro
+++ b/examples/widgets/wiggly/wiggly.pro
@@ -16,3 +16,5 @@ symbian {
TARGET.UID3 = 0xA000C607
CONFIG += qt_example
}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/widgets/windowflags/main.cpp b/examples/widgets/windowflags/main.cpp
index 8dd71ed0a5..941a3fadf7 100644
--- a/examples/widgets/windowflags/main.cpp
+++ b/examples/widgets/windowflags/main.cpp
@@ -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();
}
diff --git a/examples/widgets/windowflags/windowflags.desktop b/examples/widgets/windowflags/windowflags.desktop
new file mode 100644
index 0000000000..27fd7bd364
--- /dev/null
+++ b/examples/widgets/windowflags/windowflags.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Window Flags
+Exec=/opt/usr/bin/windowflags
+Icon=windowflags
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/windowflags/windowflags.pro b/examples/widgets/windowflags/windowflags.pro
index 19d01f3556..9a781cdce3 100644
--- a/examples/widgets/windowflags/windowflags.pro
+++ b/examples/widgets/windowflags/windowflags.pro
@@ -12,3 +12,8 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+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)
diff --git a/examples/xml/dombookmarks/dombookmarks.desktop b/examples/xml/dombookmarks/dombookmarks.desktop
new file mode 100644
index 0000000000..dfaa8a6b2d
--- /dev/null
+++ b/examples/xml/dombookmarks/dombookmarks.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=DOM Bookmarks
+Exec=/opt/usr/bin/dombookmarks
+Icon=dombookmarks
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro
index c2536eded8..b9f039de5f 100644
--- a/examples/xml/dombookmarks/dombookmarks.pro
+++ b/examples/xml/dombookmarks/dombookmarks.pro
@@ -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)
+
diff --git a/examples/xml/dombookmarks/main.cpp b/examples/xml/dombookmarks/main.cpp
index 71ce6aec0b..6a3bb8c1a9 100644
--- a/examples/xml/dombookmarks/main.cpp
+++ b/examples/xml/dombookmarks/main.cpp
@@ -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();
}
diff --git a/examples/xml/dombookmarks/mainwindow.cpp b/examples/xml/dombookmarks/mainwindow.cpp
index 0c3ceafc88..0c8568332e 100644
--- a/examples/xml/dombookmarks/mainwindow.cpp
+++ b/examples/xml/dombookmarks/mainwindow.cpp
@@ -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(),
diff --git a/examples/xml/htmlinfo/htmlinfo.desktop b/examples/xml/htmlinfo/htmlinfo.desktop
new file mode 100644
index 0000000000..901a285b47
--- /dev/null
+++ b/examples/xml/htmlinfo/htmlinfo.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=XML HTML Info
+Exec=/opt/usr/bin/htmlinfo
+Icon=htmlinfo
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/xml/htmlinfo/htmlinfo.pro b/examples/xml/htmlinfo/htmlinfo.pro
index b7a262580b..7a58ed35a0 100644
--- a/examples/xml/htmlinfo/htmlinfo.pro
+++ b/examples/xml/htmlinfo/htmlinfo.pro
@@ -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)
diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp
index cb7ac528f0..4e36b1c2cd 100644
--- a/examples/xml/htmlinfo/main.cpp
+++ b/examples/xml/htmlinfo/main.cpp
@@ -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;
}
diff --git a/examples/xml/htmlinfo/resources.qrc b/examples/xml/htmlinfo/resources.qrc
new file mode 100644
index 0000000000..a8cf88d57b
--- /dev/null
+++ b/examples/xml/htmlinfo/resources.qrc
@@ -0,0 +1,11 @@
+<RCC>
+ <qresource prefix="/">
+ <file>apache_org.html</file>
+ <file>nokia_com.html</file>
+ <file>simpleexample.html</file>
+ <file>trolltech_com.html</file>
+ <file>w3c_org.html</file>
+ <file>youtube_com.html</file>
+ </qresource>
+</RCC>
+
diff --git a/examples/xml/rsslisting/main.cpp b/examples/xml/rsslisting/main.cpp
index a646c602db..7d2b4ca10f 100644
--- a/examples/xml/rsslisting/main.cpp
+++ b/examples/xml/rsslisting/main.cpp
@@ -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();
}
diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp
index 15fd51caf8..ba9ff28072 100644
--- a/examples/xml/rsslisting/rsslisting.cpp
+++ b/examples/xml/rsslisting/rsslisting.cpp
@@ -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
}
/*
diff --git a/examples/xml/rsslisting/rsslisting.desktop b/examples/xml/rsslisting/rsslisting.desktop
new file mode 100644
index 0000000000..e45fe4a3e8
--- /dev/null
+++ b/examples/xml/rsslisting/rsslisting.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=RSS-Listing
+Exec=/opt/usr/bin/rsslisting
+Icon=rsslisting
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/xml/rsslisting/rsslisting.h b/examples/xml/rsslisting/rsslisting.h
index 98254f839b..49c694092c 100644
--- a/examples/xml/rsslisting/rsslisting.h
+++ b/examples/xml/rsslisting/rsslisting.h
@@ -48,6 +48,16 @@
#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
diff --git a/examples/xml/rsslisting/rsslisting.pro b/examples/xml/rsslisting/rsslisting.pro
index e12c023c34..551be70db7 100644
--- a/examples/xml/rsslisting/rsslisting.pro
+++ b/examples/xml/rsslisting/rsslisting.pro
@@ -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
diff --git a/examples/xml/saxbookmarks/saxbookmarks.desktop b/examples/xml/saxbookmarks/saxbookmarks.desktop
new file mode 100644
index 0000000000..5f983d2b82
--- /dev/null
+++ b/examples/xml/saxbookmarks/saxbookmarks.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=SAX Bookmarks
+Exec=/opt/usr/bin/saxbookmarks
+Icon=saxbookmarks
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/xml/saxbookmarks/saxbookmarks.pro b/examples/xml/saxbookmarks/saxbookmarks.pro
index b846fec885..76c0259203 100644
--- a/examples/xml/saxbookmarks/saxbookmarks.pro
+++ b/examples/xml/saxbookmarks/saxbookmarks.pro
@@ -26,3 +26,5 @@ symbian: {
addFiles.path = /data/qt/saxbookmarks
DEPLOYMENT += addFiles
}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/xml/streambookmarks/main.cpp b/examples/xml/streambookmarks/main.cpp
index c44e921e82..d909c01b51 100644
--- a/examples/xml/streambookmarks/main.cpp
+++ b/examples/xml/streambookmarks/main.cpp
@@ -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();
diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp
index ed765995e7..780b2b82d1 100644
--- a/examples/xml/streambookmarks/mainwindow.cpp
+++ b/examples/xml/streambookmarks/mainwindow.cpp
@@ -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(),
diff --git a/examples/xml/streambookmarks/streambookmarks.desktop b/examples/xml/streambookmarks/streambookmarks.desktop
new file mode 100644
index 0000000000..29961a90eb
--- /dev/null
+++ b/examples/xml/streambookmarks/streambookmarks.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QXmlStream Bookmarks
+Exec=/opt/usr/bin/streambookmarks
+Icon=streambookmarks
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro
index 7811775597..de9b1ab5a1 100644
--- a/examples/xml/streambookmarks/streambookmarks.pro
+++ b/examples/xml/streambookmarks/streambookmarks.pro
@@ -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
diff --git a/examples/xml/xml.pro b/examples/xml/xml.pro
index 62bb89723d..3c93131aad 100644
--- a/examples/xml/xml.pro
+++ b/examples/xml/xml.pro
@@ -19,3 +19,4 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
QT += widgets
+maemo5: CONFIG += qt_example
diff --git a/examples/xml/xmlstreamlint/xmlstreamlint.desktop b/examples/xml/xmlstreamlint/xmlstreamlint.desktop
new file mode 100644
index 0000000000..6f85e361b1
--- /dev/null
+++ b/examples/xml/xmlstreamlint/xmlstreamlint.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=XML Stream Lint
+Exec=/opt/usr/bin/xmlstreamlint
+Icon=xmlstreamlint
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/xml/xmlstreamlint/xmlstreamlint.pro b/examples/xml/xmlstreamlint/xmlstreamlint.pro
index e57e0ab3ab..32e95c5ce5 100644
--- a/examples/xml/xmlstreamlint/xmlstreamlint.pro
+++ b/examples/xml/xmlstreamlint/xmlstreamlint.pro
@@ -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)