summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/examples/applicationicon.qdoc88
-rw-r--r--doc/src/examples/cube.qdoc178
-rw-r--r--doc/src/examples/elidedlabel.qdoc162
-rw-r--r--doc/src/examples/maemovibration.qdoc164
-rw-r--r--doc/src/examples/orientation.qdoc143
-rw-r--r--doc/src/examples/symbianvibration.qdoc192
-rw-r--r--doc/src/images/appicon_packagecontents.pngbin0 -> 21266 bytes
-rw-r--r--doc/src/images/appicon_screenshot.pngbin0 -> 150183 bytes
-rw-r--r--doc/src/images/cube.pngbin0 -> 40459 bytes
-rw-r--r--doc/src/images/cube_faces.pngbin0 -> 63082 bytes
-rw-r--r--doc/src/images/elidedlabel-example.pngbin0 -> 24876 bytes
-rw-r--r--doc/src/images/maemovibration-example.pngbin0 -> 54782 bytes
-rw-r--r--doc/src/images/orientation-landscape-ui.pngbin0 -> 18077 bytes
-rw-r--r--doc/src/images/orientation-landscape.pngbin0 -> 46496 bytes
-rw-r--r--doc/src/images/orientation-portrait-ui.pngbin0 -> 9785 bytes
-rw-r--r--doc/src/images/orientation-portrait.pngbin0 -> 17377 bytes
-rw-r--r--doc/src/images/symbianvibration-example.pngbin0 -> 23217 bytes
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/main.cpp52
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp84
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/mainwindow.h65
-rw-r--r--doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro3
-rw-r--r--examples/animation/animatedtiles/animatedtiles.desktop11
-rw-r--r--examples/animation/appchooser/appchooser.desktop11
-rw-r--r--examples/animation/easing/easing.desktop11
-rw-r--r--examples/animation/moveblocks/moveblocks.desktop11
-rw-r--r--examples/animation/states/states.desktop11
-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/dbus/complexpingpong/complexping.desktop11
-rw-r--r--examples/dbus/complexpingpong/complexpong.desktop11
-rw-r--r--examples/dbus/dbus-chat/dbus-chat.desktop11
-rw-r--r--examples/dbus/listnames/listnames.desktop11
-rw-r--r--examples/dbus/pingpong/ping.desktop11
-rw-r--r--examples/dbus/pingpong/pong.desktop11
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.desktop11
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.desktop11
-rw-r--r--examples/desktop/screenshot/screenshot.desktop11
-rw-r--r--examples/desktop/systray/systray.desktop11
-rw-r--r--examples/dialogs/classwizard/classwizard.desktop11
-rw-r--r--examples/dialogs/configdialog/configdialog.desktop11
-rw-r--r--examples/dialogs/extension/extension.desktop11
-rw-r--r--examples/dialogs/findfiles/findfiles.desktop11
-rw-r--r--examples/dialogs/licensewizard/licensewizard.desktop11
-rw-r--r--examples/dialogs/sipdialog/sipdialog.desktop11
-rw-r--r--examples/dialogs/standarddialogs/standarddialogs.desktop11
-rw-r--r--examples/dialogs/tabdialog/tabdialog.desktop11
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.desktop11
-rw-r--r--examples/draganddrop/delayedencoding/delayedencoding.desktop11
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.desktop11
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.desktop11
-rw-r--r--examples/draganddrop/dropsite/dropsite.desktop11
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.desktop11
-rw-r--r--examples/draganddrop/puzzle/puzzle.desktop11
-rw-r--r--examples/effects/blurpicker/blurpicker.desktop11
-rw-r--r--examples/effects/fademessage/fademessage.desktop11
-rw-r--r--examples/effects/lighting/lighting.desktop11
-rw-r--r--examples/gestures/imagegestures/imagegestures.desktop11
-rw-r--r--examples/graphicsview/anchorlayout/anchorlayout.desktop11
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.desktop11
-rw-r--r--examples/graphicsview/collidingmice/collidingmice.desktop11
-rw-r--r--examples/graphicsview/dragdroprobot/dragdroprobot.desktop11
-rw-r--r--examples/graphicsview/elasticnodes/elasticnodes.desktop11
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.desktop11
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.desktop11
-rw-r--r--examples/graphicsview/portedasteroids/portedasteroids.desktop11
-rw-r--r--examples/graphicsview/portedcanvas/portedcanvas.desktop11
-rw-r--r--examples/graphicsview/simpleanchorlayout/simpleanchorlayout.desktop11
-rw-r--r--examples/graphicsview/weatheranchorlayout/weatheranchorlayout.desktop11
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.desktop11
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.desktop11
-rw-r--r--examples/ipc/sharedmemory/sharedmemory.desktop11
-rw-r--r--examples/itemviews/addressbook/addressbook.desktop11
-rw-r--r--examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop11
-rw-r--r--examples/itemviews/chart/chart.desktop11
-rw-r--r--examples/itemviews/coloreditorfactory/coloreditorfactory.desktop11
-rw-r--r--examples/itemviews/combowidgetmapper/combowidgetmapper.desktop11
-rw-r--r--examples/itemviews/customsortfiltermodel/customsortfiltermodel.desktop11
-rw-r--r--examples/itemviews/dirview/dirview.desktop11
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.desktop11
-rw-r--r--examples/itemviews/fetchmore/fetchmore.desktop11
-rw-r--r--examples/itemviews/frozencolumn/frozencolumn.desktop11
-rw-r--r--examples/itemviews/pixelator/pixelator.desktop11
-rw-r--r--examples/itemviews/puzzle/puzzle.desktop11
-rw-r--r--examples/itemviews/simpledommodel/simpledommodel.desktop11
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.desktop11
-rw-r--r--examples/itemviews/simplewidgetmapper/simplewidgetmapper.desktop11
-rw-r--r--examples/itemviews/spinboxdelegate/spinboxdelegate.desktop11
-rw-r--r--examples/itemviews/stardelegate/stardelegate.desktop11
-rw-r--r--examples/layouts/basiclayouts/basiclayouts.desktop11
-rw-r--r--examples/layouts/borderlayout/borderlayout.desktop11
-rw-r--r--examples/layouts/dynamiclayouts/dynamiclayouts.desktop11
-rw-r--r--examples/layouts/flowlayout/flowlayout.desktop11
-rw-r--r--examples/mainwindows/application/application.desktop11
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.desktop11
-rw-r--r--examples/mainwindows/mdi/mdi.desktop11
-rw-r--r--examples/mainwindows/menus/menus.desktop11
-rw-r--r--examples/mainwindows/recentfiles/recentfiles.desktop11
-rw-r--r--examples/mainwindows/sdi/sdi.desktop11
-rw-r--r--examples/network/bearercloud/bearercloud.desktop11
-rw-r--r--examples/network/bearermonitor/bearermonitor.desktop11
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.desktop11
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.desktop11
-rw-r--r--examples/network/broadcastsender/broadcastsender.desktop11
-rw-r--r--examples/network/download/download.desktop11
-rw-r--r--examples/network/downloadmanager/downloadmanager.desktop11
-rw-r--r--examples/network/fortuneclient/fortuneclient.desktop11
-rw-r--r--examples/network/fortuneserver/fortuneserver.desktop11
-rw-r--r--examples/network/googlesuggest/googlesuggest.desktop11
-rw-r--r--examples/network/http/http.desktop11
-rw-r--r--examples/network/loopback/loopback.desktop11
-rw-r--r--examples/network/network-chat/network-chat.desktop11
-rw-r--r--examples/network/qftp/qftp.desktop11
-rw-r--r--examples/network/securesocketclient/securesocketclient.desktop11
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.desktop11
-rw-r--r--examples/network/torrent/torrent.desktop11
-rw-r--r--examples/opengl/2dpainting/2dpainting.desktop11
-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/grabber/grabber.desktop11
-rw-r--r--examples/opengl/hellogl/hellogl.desktop11
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.desktop11
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.desktop11
-rw-r--r--examples/opengl/overpainting/overpainting.desktop11
-rw-r--r--examples/opengl/pbuffers/pbuffers.desktop11
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.desktop11
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.desktop11
-rw-r--r--examples/opengl/textures/textures.desktop11
-rw-r--r--examples/openvg/openvg.desktop11
-rw-r--r--examples/painting/basicdrawing/basicdrawing.desktop11
-rw-r--r--examples/painting/concentriccircles/concentriccircles.desktop11
-rw-r--r--examples/painting/fontsampler/fontsampler.desktop11
-rw-r--r--examples/painting/imagecomposition/imagecomposition.desktop11
-rw-r--r--examples/painting/painterpaths/painterpaths.desktop11
-rw-r--r--examples/painting/svggenerator/svggenerator.desktop11
-rw-r--r--examples/painting/svgviewer/svgviewer.desktop11
-rw-r--r--examples/painting/transformations/transformations.desktop11
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.desktop11
-rw-r--r--examples/qtconcurrent/map/map.desktop11
-rw-r--r--examples/qtconcurrent/progressdialog/progressdialog.desktop11
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.desktop11
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.desktop11
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.desktop11
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.desktop11
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.desktop11
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.desktop11
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.desktop11
-rw-r--r--examples/qws/dbscreen/dbscreen.desktop11
-rw-r--r--examples/qws/framebuffer/framebuffer.desktop11
-rw-r--r--examples/qws/mousecalibration/mousecalibration.desktop11
-rw-r--r--examples/qws/simpledecoration/simpledecoration.desktop11
-rw-r--r--examples/qws/svgalib/svgalib.desktop11
-rw-r--r--examples/richtext/calendar/calendar.desktop11
-rw-r--r--examples/richtext/orderform/orderform.desktop11
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.desktop11
-rw-r--r--examples/sql/cachedtable/cachedtable.desktop11
-rw-r--r--examples/sql/drilldown/drilldown.desktop11
-rw-r--r--examples/sql/masterdetail/masterdetail.desktop11
-rw-r--r--examples/sql/querymodel/querymodel.desktop11
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.desktop11
-rw-r--r--examples/sql/sqlwidgetmapper/sqlwidgetmapper.desktop11
-rw-r--r--examples/sql/tablemodel/tablemodel.desktop11
-rw-r--r--examples/statemachine/eventtransitions/eventtransitions.desktop11
-rw-r--r--examples/statemachine/factorial/factorial.desktop11
-rw-r--r--examples/statemachine/pingpong/pingpong.desktop11
-rw-r--r--examples/statemachine/rogue/rogue.desktop11
-rw-r--r--examples/statemachine/trafficlight/trafficlight.desktop11
-rw-r--r--examples/statemachine/twowaybutton/twowaybutton.desktop11
-rw-r--r--examples/threads/mandelbrot/mandelbrot.desktop11
-rw-r--r--examples/threads/queuedcustomtype/queuedcustomtype.desktop11
-rw-r--r--examples/threads/semaphores/semaphores.desktop11
-rw-r--r--examples/threads/waitconditions/waitconditions.desktop11
-rw-r--r--examples/tools/codecs/codecs.desktop11
-rw-r--r--examples/tools/completer/completer.desktop11
-rw-r--r--examples/tools/contiguouscache/contiguouscache.desktop11
-rw-r--r--examples/tools/customcompleter/customcompleter.desktop11
-rw-r--r--examples/tools/customtype/customtype.desktop11
-rw-r--r--examples/tools/customtypesending/customtypesending.desktop11
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.desktop11
-rw-r--r--examples/tools/echoplugin/plugin/plugin.desktop11
-rw-r--r--examples/tools/i18n/i18n.desktop11
-rw-r--r--examples/tools/inputpanel/inputpanel.desktop11
-rw-r--r--examples/tools/plugandpaint/plugandpaint.desktop11
-rw-r--r--examples/tools/regexp/regexp.desktop11
-rw-r--r--examples/tools/settingseditor/settingseditor.desktop11
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.desktop11
-rw-r--r--examples/tools/undoframework/undoframework.desktop11
-rw-r--r--examples/touch/dials/dials.desktop11
-rw-r--r--examples/touch/fingerpaint/fingerpaint.desktop11
-rw-r--r--examples/touch/knobs/knobs.desktop11
-rw-r--r--examples/touch/pinchzoom/pinchzoom.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part1/part1.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part2/part2.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part3/part3.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part4/part4.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part5/part5.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part6/part6.desktop11
-rw-r--r--examples/tutorials/addressbook-fr/part7/part7.desktop11
-rw-r--r--examples/tutorials/addressbook/part1/part1.desktop11
-rw-r--r--examples/tutorials/addressbook/part2/part2.desktop11
-rw-r--r--examples/tutorials/addressbook/part3/part3.desktop11
-rw-r--r--examples/tutorials/addressbook/part4/part4.desktop11
-rw-r--r--examples/tutorials/addressbook/part5/part5.desktop11
-rw-r--r--examples/tutorials/addressbook/part6/part6.desktop11
-rw-r--r--examples/tutorials/addressbook/part7/part7.desktop11
-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
-rw-r--r--examples/tutorials/modelview/2_formatting/2_formatting.desktop11
-rw-r--r--examples/tutorials/modelview/3_changingmodel/3_changingmodel.desktop11
-rw-r--r--examples/tutorials/modelview/4_headers/4_headers.desktop11
-rw-r--r--examples/tutorials/modelview/5_edit/5_edit.desktop11
-rw-r--r--examples/tutorials/modelview/6_treeview/6_treeview.desktop11
-rw-r--r--examples/tutorials/modelview/7_selections/7_selections.desktop11
-rw-r--r--examples/tutorials/widgets/childwidget/childwidget.desktop11
-rw-r--r--examples/tutorials/widgets/nestedlayouts/nestedlayouts.desktop11
-rw-r--r--examples/tutorials/widgets/toplevel/toplevel.desktop11
-rw-r--r--examples/tutorials/widgets/windowlayout/windowlayout.desktop11
-rw-r--r--examples/uitools/multipleinheritance/multipleinheritance.desktop11
-rw-r--r--examples/uitools/textfinder/textfinder.desktop11
-rw-r--r--examples/widgets/analogclock/analogclock.desktop11
-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.desktop11
-rw-r--r--examples/widgets/calculator/releasenotes.txt4
-rw-r--r--examples/widgets/calendarwidget/calendarwidget.desktop11
-rw-r--r--examples/widgets/charactermap/charactermap.desktop11
-rw-r--r--examples/widgets/codeeditor/codeeditor.desktop11
-rw-r--r--examples/widgets/digitalclock/digitalclock.desktop11
-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/icons/icons.desktop11
-rw-r--r--examples/widgets/imageviewer/imageviewer.desktop11
-rw-r--r--examples/widgets/lineedits/lineedits.desktop11
-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/movie.desktop11
-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/scribble.desktop11
-rw-r--r--examples/widgets/shapedclock/shapedclock.desktop11
-rw-r--r--examples/widgets/sliders/sliders.desktop11
-rw-r--r--examples/widgets/softkeys/softkeys.desktop11
-rw-r--r--examples/widgets/spinboxes/spinboxes.desktop11
-rw-r--r--examples/widgets/styles/styles.desktop11
-rw-r--r--examples/widgets/stylesheet/stylesheet.desktop11
-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/tablet.desktop11
-rw-r--r--examples/widgets/tetrix/tetrix.desktop11
-rw-r--r--examples/widgets/tooltips/tooltips.desktop11
-rw-r--r--examples/widgets/validators/validators.desktop11
-rw-r--r--examples/widgets/wiggly/wiggly.desktop11
-rw-r--r--examples/widgets/windowflags/windowflags.desktop11
-rw-r--r--examples/xml/dombookmarks/dombookmarks.desktop11
-rw-r--r--examples/xml/htmlinfo/htmlinfo.desktop11
-rw-r--r--examples/xml/rsslisting/rsslisting.desktop11
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.desktop11
-rw-r--r--examples/xml/streambookmarks/streambookmarks.desktop11
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.desktop11
302 files changed, 5585 insertions, 0 deletions
diff --git a/doc/src/examples/applicationicon.qdoc b/doc/src/examples/applicationicon.qdoc
new file mode 100644
index 0000000000..d03bf3634a
--- /dev/null
+++ b/doc/src/examples/applicationicon.qdoc
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*! \example widgets/applicationicon
+ \group all-examples
+ \title Application Icon Example
+
+ The example shows how to add an application icon to a mobile application.
+
+ \image appicon_screenshot.png The icon on a Nokia XPressMusic 5800
+
+ \section1 Creating an icon for Maemo
+
+ Maemo expects the icon of an application to be a 64x64 PNG image file. The
+ file name of the icon should be the same as the executable with a \c .png
+ extension. You also need a \c .desktop file that gives the window manager
+ hints about the application, such as name, type and icon.
+
+ \quotefile examples/widgets/applicationicon/applicationicon.desktop
+
+ The \c Icon field should also contain the name of the executable. On the
+ device, application icons are stored in the
+ \c /usr/share/icons/hicolor/64x64/apps directory
+ and desktop files in the \c /usr/share/applications/hildon directory.
+
+ \section1 Creating an icon for Symbian
+
+ Symbian uses Scalable Vector Graphics (SVG Tiny 1.1+) to render
+ application icons in the application menu. Therefore icons could be
+ created manually with a text editor, since SVG files are plain text with
+ XML syntax, but usually you would use a vector graphics program that is
+ able to output SVG files. Popular graphics programs such as Adobe
+ Illustrator or Inkscape are able to do so.
+
+ For best results, the icon should be created on a 44x44 pixel canvas.
+ Otherwise the image might be scaled in unexpected ways.
+
+ Once you have created your icon, make sure that it is stored according to
+ the SVG-Tiny 1.1+ standard. Inkscape, for instance, is not able to save
+ images that way, but there are tools that can convert general SVG files
+ into the Tiny format. For instance, the svg2svgt tool that is bundled with
+ Symbian 3rd and 5th editon SDKs under the folder s60tools can do this
+ conversion to some extent. Another tool to convert SVG to SVG Tiny is SVG
+ Pony.
+
+ \section1 Adding the icons to the project
+
+ Edit the .pro file and specify the ICON variable for the symbian target.
+ For Maemo, we need to add that the \c .desktop and icon file should be
+ installed.
+
+ \quotefile examples/widgets/applicationicon/applicationicon.pro
+
+ Currently, Qt Creator doesn't include the icon and desktop files in the
+ application package for Maemo, merely the executable file is included. As a
+ workaround for this, the files can be added manually in the Projects tab.
+ In the "Create Package" build step for the Maemo target, the \c .desktop
+ file and icon can be added to be a part of the package contents.
+ Unfortunately, these additions are only stored as a part of the
+ \c .pro.user file. This issue will be resolved in a future release of
+ Qt Creator.
+
+ \image appicon_packagecontents.png Manual addition of files to the "Create Package" build step
+*/
diff --git a/doc/src/examples/cube.qdoc b/doc/src/examples/cube.qdoc
new file mode 100644
index 0000000000..0603941c7b
--- /dev/null
+++ b/doc/src/examples/cube.qdoc
@@ -0,0 +1,178 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example opengl/cube
+ \group all-examples
+ \title Cube OpenGL ES 2.0 example
+
+ The Cube OpenGL ES 2.0 example shows how to write mouse rotateable
+ textured 3D cube using OpenGL ES 2.0 with Qt. It shows how to handle
+ polygon geometries efficiently and how to write simple vertex and
+ fragment shader for programmable graphics pipeline. In addition it
+ shows how to use quaternions for representing 3D object orientation.
+
+ This example has been written for OpenGL ES 2.0 but it works also on
+ desktop OpenGL because this example is simple enough and for the
+ most parts desktop OpenGL API is same. It compiles also without OpenGL
+ support but then it just shows a label stating that OpenGL support is
+ required.
+
+ \image cube.png Screenshot of the Cube example running on N900
+
+ The example consist of two classes:
+
+ \list
+ \o \c MainWidget extends QGLWidget and contains OpenGL ES 2.0
+ initialization and drawing and mouse and timer event handling
+ \o \c GeometryEngine handles polygon geometries. Transfers polygon geometry
+ to vertex buffer objects and draws geometries from vertex buffer objects.
+ \endlist
+
+ We'll start by initializing OpenGL ES 2.0 in \c MainWidget.
+
+ \tableofcontents
+
+ \section1 Initializing OpenGL ES 2.0
+
+ Since OpenGL ES 2.0 doesn't support fixed graphics pipeline anymore it has to
+ be implemented by ourselves. This makes graphics pipeline very flexible but
+ in the same time it becomes more difficult because user has to implement graphics
+ pipeline to get even the simplest example running. It also makes graphics pipeline
+ more efficient because user can decide what kind of pipeline is needed for the
+ application.
+
+ First we have to implement vertex shader. It gets vertex data and
+ model-view-projection matrix (MVP) as parameters. It transforms vertex position
+ using MVP matrix to screen space and passes texture coordinate to
+ fragment shader. Texture coordinate will be automatically interpolated on polygon
+ faces.
+
+ \snippet examples/opengl/cube/vshader.glsl 0
+
+ After that we need to implement second part of the graphics pipeline - fragment
+ shader. For this exercise we need to implement fragment shader that handles
+ texturing. It gets interpolated texture coordinate as a parameter and looks up
+ fragment color from the given texture.
+
+ \snippet examples/opengl/cube/fshader.glsl 0
+
+ Using \c QGLShaderProgram we can compile, link and bind shader code to
+ graphics pipeline. This code uses Qt Resource files to access shader source code.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 3
+
+ The following code enables depth buffering and back face culling.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 2
+
+ \section1 Loading textures from Qt Resource files
+
+ \c QGLWidget interface implements methods for loading textures from QImage to GL
+ texture memory. We still need to use OpenGL provided functions for specifying
+ the GL texture unit and configuring texture filtering options.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 4
+
+ \section1 Cube Geometry
+
+ There are many ways to render polygons in OpenGL but the most efficient way is
+ to use only triangle strip primitives and render vertices from graphics hardware
+ memory. OpenGL has a mechanism to create buffer objects to this memory area and
+ transfer vertex data to these buffers. In OpenGL terminology these are referred
+ as Vertex Buffer Objects (VBO).
+
+ \image cube_faces.png Cube faces and vertices
+
+ This is how cube faces break down to triangles. Vertices are ordered this way
+ to get vertex ordering correct using triangle strips. OpenGL determines triangle
+ front and back face based on vertex ordering. By default OpenGL uses
+ counter-clockwise order for front faces. This information is used by back face
+ culling which improves rendering performance by not rendering back faces of the
+ triangles. This way graphics pipeline can omit rendering sides of the triangle that
+ aren't facing towards screen.
+
+ Creating vertex buffer objects and transferring data to them is quite simple using
+ OpenGL provided functions.
+
+ \snippet examples/opengl/cube/geometryengine.cpp 0
+
+ \snippet examples/opengl/cube/geometryengine.cpp 1
+
+ Drawing primitives from VBOs and telling programmable graphics pipeline how to
+ locate vertex data requires few steps. First we need to bind VBOs to be used.
+ After that we bind shader program attribute names and configure what
+ kind of data it has in the bound VBO. Finally we'll draw triangle
+ strip primitives using indices from the other VBO.
+
+ \snippet examples/opengl/cube/geometryengine.cpp 2
+
+ \section1 Perspective projection
+
+ Using \c QMatrix4x4 helper methods it's really easy to calculate perpective
+ projection matrix. This matrix is used to project vertices to screen space.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 5
+
+ \section1 Orientation of the 3D object
+
+ Quaternions are handy way to represent orientation of the 3D object. Quaternions
+ involve quite complex mathematics but fortunately all the necessary mathematics
+ behind quaternions is implemented in \c QQuaternion. That allows us to store
+ cube orientation in quaternion and rotating cube around given axis is quite
+ simple.
+
+ The following code calculates rotation axis and angular speed based on mouse events.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 0
+
+ \c QBasicTimer is used to animate scene and update cube orientation. Rotations
+ can be concatenated simply by multiplying quaternions.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 1
+
+ Model-view matrix is calculated using the quaternion and by moving world by Z axis.
+ This matrix is multiplied with the projection matrix to get MVP matrix for shader
+ program.
+
+ \snippet examples/opengl/cube/mainwidget.cpp 6
+
+*/
diff --git a/doc/src/examples/elidedlabel.qdoc b/doc/src/examples/elidedlabel.qdoc
new file mode 100644
index 0000000000..4c6e8e8128
--- /dev/null
+++ b/doc/src/examples/elidedlabel.qdoc
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/elidedlabel
+ \group all-examples
+ \title Elided Label Example
+
+ This example creates a widget similar to QLabel, that elides the last
+ visible line, if the text is too long to fit the widget's geometry.
+
+ \image elidedlabel-example.png Elided Label example on XPressMusic 5800
+
+ When text of varying length has to be displayed in a uniformly sized
+ area, for instance within a list or grid view where all list items have the
+ same size, it can be useful to give the user a visual clue when not all
+ text is visible. QLabel can elide text that doesn't fit within it, but only
+ in one line. The \c ElidedLabel widget shown in this example word wraps its
+ text by its width, and elides the last visible line if some text is left
+ out. \c TestWidget gives control to the features of \c ElidedWidget and
+ forms the example application.
+
+
+ \section1 ElidedLabel Class Definition
+
+ Like QLabel, \c ElidedLabel inherits from QFrame. Here's the definition of
+ the \c ElidedLabel class:
+
+
+ \snippet examples/widgets/elidedlabel/elidedlabel.h 0
+
+ The \c isElided property depends the font, text content and geometry of the
+ widget. Whenever any of these change, the \c elisionChanged() signal might
+ trigger. We cache the current elision value in \c elided, so that it
+ doesn't have to be recomputed every time it's asked for.
+
+
+ \section1 ElidedLabel Class Implementation
+
+ Except for initializing the member variables, the constructor sets the size
+ policy to be horizontally expanding, since it's meant to fill the width of
+ its container and grow vertically.
+
+ \snippet examples/widgets/elidedlabel/elidedlabel.cpp 0
+
+ Changing the \c content require a repaint of the widget.
+
+ \snippet examples/widgets/elidedlabel/elidedlabel.cpp 1
+
+ QTextLayout is used in the \c paintEvent() to divide the \c content into
+ lines, that wrap on word boundaries. Each line, except the last visible
+ one, is drawn \c lineSpacing pixels below the previous one. The \c draw()
+ method of QTextLine will draw the line using the coordinate point as the
+ top left corner.
+
+ \snippet examples/widgets/elidedlabel/elidedlabel.cpp 2
+
+ Unfortunately, QTextLayout does not elide text, so the last visible line
+ has to be treated differently. This last line is elided if it is too wide.
+ The \c drawText() method of QPainter draws the text starting from the base
+ line, which is \c ascecnt() pixels below the last drawn line.
+
+ Finally, one more line is created to see if everything fit on this line.
+
+ \snippet examples/widgets/elidedlabel/elidedlabel.cpp 3
+
+ If the text was elided and wasn't before or vice versa, cache it in
+ \c elided and emit the change.
+
+ \snippet examples/widgets/elidedlabel/elidedlabel.cpp 4
+
+
+ \section1 TestWidget Class Definition
+
+ \c TestWidget is a QWidget and is the main window of the example. It
+ contains an \c ElidedLabel which can be resized with two QSlider widgets.
+
+ \snippet examples/widgets/elidedlabel/testwidget.h 0
+
+ \section1 TestWidget Class Implementation
+
+ The constructor initializes the whole widget. Strings of different length
+ are stored in \c textSamples. The user is able to switch between these.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 0
+
+ An \c ElidedLabel is created to contain the first of the sample strings.
+ The frame is made visible to make it easier to see the actual size of the
+ widget.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 1
+
+ The buttons and the elision label are created. By connecting the
+ \c elisionChanged() signal to the \c setVisible() slot of the \c label,
+ it will act as an indicator to when the text is elided or not. This signal
+ could, for instance, be used to make a "More" button visible, or similar.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 2
+
+ The \c widthSlider and \c heightSlider specify the size of the
+ \c elidedText. Since the y-axis is inverted, the \c heightSlider has to be
+ inverted to act appropriately.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 3
+
+ The components are all stored in a QGridLayout, which is made the layout of
+ the \c TestWidget.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 4
+
+ On the Maemo platform, windows are stuck in landscape mode by default. With
+ this attribute set, the window manager is aware that this window can be
+ rotated.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 5
+
+ The \c widthSlider and \c heightSlider have the exact same length as the
+ dimensions of the \c elidedText. The maximum value for both of them is
+ thus their lengths, and each tick indicates one pixel.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 6
+
+ The \c switchText() slot simply cycles through all the available sample
+ texts.
+
+ \snippet examples/widgets/elidedlabel/testwidget.cpp 7
+
+ These slots set the width and height of the \c elided text, in response to
+ changes in the sliders.
+
+ \section1 The \c main() Function
+
+ The \c main() function creates an instance of \c TestWidget fullscreen and
+ enters the message loop.
+
+ \snippet examples/widgets/elidedlabel/main.cpp 0
+*/
+
diff --git a/doc/src/examples/maemovibration.qdoc b/doc/src/examples/maemovibration.qdoc
new file mode 100644
index 0000000000..280dc30c99
--- /dev/null
+++ b/doc/src/examples/maemovibration.qdoc
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example widgets/maemovibration
+ \group all-examples
+ \title Maemo Vibration Example
+
+ The Maemo Vibration example shows how to tell the Maemo Mode Control Entity
+ (MCE) to vibrate a maemo device.
+
+ The MCE is a system service on Maemo that, among other things, provides an
+ D-Bus interface to trigger vibrations. The vibrations are specified as
+ patterns and are defined in a system configuration file.
+
+ The example program reads the configuration file to look for possible
+ vibration patterns and display a button for each. Pressing a button will
+ make the device vibrate accordingly, until the application closes, or
+ another pattern is started.
+
+ \image maemovibration-example.png Screenshot of the Maemo Vibration Example
+
+ The code makes use of two classes:
+
+ \list
+ \o \c MceVibrator connects to the MCE service and can start a certain
+ vibrator pattern. It also is responsible to parse the configuration
+ file.
+
+ \o \c ButtonWidget provides a button for each pattern. Pressing the button
+ activates the pattern in question.
+ \endlist
+
+
+ \section1 MceVibrator Class Definition
+
+ \snippet examples/widgets/maemovibration/mcevibrator.h 0
+
+ The \c MceVibrator class inherits from QObject and provides a specialized
+ and Qt friendly interface to the MCE vibration facilty. The slot \c vibrate()
+ can be called to make the device vibrate according to a specific pattern
+ name. We will connect it to a signal of a \c ButtonWidget object later. The
+ static method \c ParsePatternNames() can be called to find out which patterns
+ are available to us.
+
+ \list
+ \o \c mceInterface is our D-Bus handle to the MCE service. We use it to
+ invoke methods on the MCE request object.
+
+ \o \c lastPatternName contains the pattern that was activated last time. We
+ have to keep track of this, because the last pattern has to be
+ deactivated before activating a new pattern.
+ \endlist
+
+
+ \section1 MceVibrator Class Implementation
+
+ To connect to the service, we initialize the D-Bus interface handle. The
+ system header \c "mce/dbus-names.h" contains definitions of the D-Bus
+ service name and request object path and interface. These are passed to the
+ constructor of the handle, and Qt will automatically establish a connection
+ to it, if it is possible.
+
+ The MCE expects us to first enable the vibrator before we can use it. This
+ is done with the call to the \c MCE_ENABLE_VIBRATOR D-Bus method.
+
+ \snippet examples/widgets/maemovibration/mcevibrator.cpp 0
+
+ From now on we can activate vibration patterns. Each time a vibration
+ pattern is activated, the last pattern has to be deactivated first. In the
+ vibrate slot we use the MCE interface to call the activation method.
+
+ \snippet examples/widgets/maemovibration/mcevibrator.cpp 1
+
+ The calls to the private method deactivate simply makes sure to deactivate
+ the last pattern used, if there was one.
+
+ \snippet examples/widgets/maemovibration/mcevibrator.cpp 2
+
+ Calling either the activate or deactivate MCE D-Bus method with invalid
+ pattern names are ignored.
+
+ Finally, the destructor disables the vibrator. When the destructor of the
+ MCE interface handle is called, the connection is also closed.
+
+ \snippet examples/widgets/maemovibration/mcevibrator.cpp 3
+
+ The MCE configuration file contains options for many different things. We
+ are only interested in one line that contains the vibration patterns. It
+ has the following format:
+
+
+ \code
+ VibratorPatterns=semicolon;separated;list;of;values
+ \endcode
+
+ The static method \c ParsePatternNames looks for this line and returns a
+ QStringList containing the values, which are the pattern names we can use.
+
+ \snippet examples/widgets/maemovibration/mcevibrator.cpp 4
+
+ The helper function \c checkError() saves us some code duplication. None of the
+ called methods return anything of use to us, so we're only interested in
+ getting error messages for debugging.
+
+ \snippet examples/widgets/maemovibration/mcevibrator.cpp 5
+
+
+ \section1 ButtonWidget Class Definition
+
+ \snippet examples/widgets/maemovibration/buttonwidget.h 0
+
+ The \c ButtonWidget class inherits from QWidget and provides the main user
+ interface for the application. It creates a grid of buttons, one for each
+ string in the stringlist passed to the constructor. Pressing a button emits
+ the \c clicked() signal, where the string is the text of the button that
+ was pressed.
+
+ This class is taken from the QSignalMapper documentation. The only change
+ is the number of columns in the grid from three to two, to make the button
+ labels fit.
+
+
+ \section1 ButtonWidget Class Implementation
+
+ \snippet examples/widgets/maemovibration/buttonwidget.cpp 0
+
+
+ \section1 \c main() Function
+
+ The main function begins with looking up the patterns available to us.
+
+ \snippet examples/widgets/maemovibration/main.cpp 0
+
+ Then we create one instance of both classes, and connects the
+ \c ButtonWidget's clicked signal to the \c MceVibrator's \c vibrate() slot.
+ This works, since the button texts are the same as the pattern names.
+
+ \snippet examples/widgets/maemovibration/main.cpp 1
+*/
diff --git a/doc/src/examples/orientation.qdoc b/doc/src/examples/orientation.qdoc
new file mode 100644
index 0000000000..cfe17576e7
--- /dev/null
+++ b/doc/src/examples/orientation.qdoc
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*! \example widgets/orientation
+ \group all-examples
+ \title Orientation Example
+
+ The example shows a simple way to use different UIs depending on the screen
+ orientation of a mobile device.
+
+ \image orientation-landscape.png The UI in landscape mode
+ \image orientation-portrait.png The UI in portrait mode
+
+ The screen on many mobile devices can be viewed in both portrait and
+ landscape orientation. The orientation can be swiched with the help of a
+ hardware or software trigger. Due to the often small physical screen size,
+ user interfaces has to be very simple and compact to stay usable, and
+ applications usually occupy the whole screen. Designing a user interface
+ that works equally well in both landscape and portrait mode is not always
+ possible, however, so making a different layout for each case usually pays
+ off.
+
+ The example application makes use of two different UI widgets created with
+ the Qt Designer, one for portrait and one for landscape orientation. The
+ application has a widget that contains an image and the user is able to
+ select one of three images for it to show. In addition to the two UIs, the
+ application consists of a \c MainWindow class.
+
+ \section1 Landscape UI
+
+ If the screen is in landscape mode, the user probably holds the device with
+ both hands and is ready to give full attention to the application. The
+ landscape UI looks like this:
+
+ \image orientation-landscape-ui.png The landscape UI
+
+ To the left is a QWidget called \c choiceWidget, which will show the
+ current image, and to the right are three QRadioButton instances. The
+ active radio button specifies the image to show.
+
+ \section1 Portrait UI
+
+ When the device is in portrait mode, it usually means that the user holds
+ it with one hand, and can comfortably use the thumb for small amounts of
+ input. The layout is simpler, and is focused on consuming content. The
+ portrait UI looks like this:
+
+ \image orientation-portrait-ui.png The portrait UI
+
+ Similarly, it contains a QWidget, also called \c choiceWidget, that will
+ show the current image. In contrast to the landscape UI, this one doesn't
+ provide any controls to change the image.
+
+ \section1 MainWindow Class Definition
+
+ \c MainWindow inherits from QWidget and acts as the top level widget of the
+ application.
+
+ \snippet examples/widgets/orientation/mainwindow.h 0
+
+ The \c resizeEvent() method is re-implemented, and used to check which
+ UI to show. The \c onRadioButtonClicked() slot is connected to the
+ landscape UI's radio button group and selects the current image.
+
+ \c landscapeWidget and \c portraitWidget will contain the UI layouts. Only
+ one of them is visible at a time.
+
+ \section1 MainWindow Class Implementation
+
+ In the constructor, the widgets that will hold the UIs are created and set
+ up.
+
+ \snippet examples/widgets/orientation/mainwindow.cpp 0
+
+ Since the exit buttons on the layouts are different from each other, both
+ of them have to have their \c clicked() signal connected to the \c close()
+ slot of the main widget. The first image is also made current with the call
+ to \c onRadioButtonClicked().
+
+ \snippet examples/widgets/orientation/mainwindow.cpp 1
+
+ On the Maemo platform, windows are stuck in landscape mode by default. The
+ application has to explicitly say that rotation is supported.
+
+ \snippet examples/widgets/orientation/mainwindow.cpp 2
+
+ The \c resizeEvent() is called when the main window is first created, and
+ also whenever the window has been resized. If the window is shown in
+ full screen, this is an indication that the orientation of the screen has
+ changed.
+
+ The dimensions of \c landscapeWidget is the transpose of the dimensions of
+ \c portraitWidget. When the orientation is known, both are set to the
+ (possibly transposed) size of the window. Depending on the orientation, one
+ widget is made visible and the other invisible.
+
+ \snippet examples/widgets/orientation/mainwindow.cpp 3
+
+ When the user selects one of the radio buttons in the landscape UI, the
+ current image is changed. The image is displayed by specifying the
+ background style of the choice widget. Since both \c portrait and
+ \c landscape have a \c choiceWidget of their own, the change has to be
+ reflected in both instances.
+
+ \snippet examples/widgets/orientation/mainwindow.cpp 4
+
+ Synchronizing both UIs like this might become unfeasible when there are
+ many things that can change. In that case it is better to make use of the
+ \l{Introduction to Model/View Programming}{Model-View-Controller pattern}
+ more extensively and share the content between both portrait and landscape
+ widgets. Then an interface for displaying and manipulating it can be tailor
+ made for both orientations.
+
+ \section1 The \c main() Function
+
+ The main function creates a \c MainWindow instance and shows it full
+ screen.
+ \snippet examples/widgets/orientation/main.cpp 0
+*/
diff --git a/doc/src/examples/symbianvibration.qdoc b/doc/src/examples/symbianvibration.qdoc
new file mode 100644
index 0000000000..a0de23685d
--- /dev/null
+++ b/doc/src/examples/symbianvibration.qdoc
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in a
+** written agreement between you and Nokia.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*! \example widgets/symbianvibration
+ \group all-examples
+ \title Symbian Vibration Example
+
+ The Symbian Vibrator example shows how to get fine-grained vibration
+ control on Symbian devices.
+
+ Native Symbian APIs have to be used to enable vibration, since QtMobility
+ doesn't provide an interface for it yet. It is, however, planned to be
+ included in a future release. In anticipation for that, we make use of the
+ \c XQVibra class that was a part of the Mobile Extensions Technology Preview
+ API for Qt for Symbian. The pre-compiled libraries are no longer compatible
+ with Qt 4.6, but we can include the source code itself with the project.
+
+ \image symbianvibration-example.png Screenshot of the Symbian Vibration example
+
+ The example application divides the window into rectangles, which can be
+ pressed to make the device vibrate. Pressing different rectangles make the
+ device vibrate with different intensities. Each rectangle has a different
+ color and its intensity number is drawn on top of it. Moving the cursor
+ from one rectangle to another changes the vibration intensity to that of
+ the new one. Vibration stops when the mouse button has been released. It
+ is also possible to launch a short burst of vibration through the menu.
+
+ The example consists of four classes:
+
+ \list
+ \o \c XQVibra is the vibration interface class taken from the Mobile
+ Extensions for Qt for Symbian.
+
+ \o \c XQVibraPrivate is the Symbian specific private implementation of the
+ vibration implementation.
+
+ \o \c VibrationSurface is a custom widget that uses a XQVibra instance to
+ vibrate the device depending on where the user presses.
+
+ \o \c MainWindow inherits from QMainWindow and contains a \c VibrationSurface
+ as its central widget, and also has a menu from which it is possible to
+ make the phone vibrate.
+ \endlist
+
+ \section1 XQVibra Class Definition
+
+ The \c XQVibra class uses the pimpl-idiom to hide the platform specific
+ implementation behind a common interface. Technically it would be possible
+ to support more target platforms, with only the addition of a private
+ implementation. The rest of the code would work the same, since only the
+ common interface is used.
+
+ \snippet examples/widgets/symbianvibration/xqvibra.h 0
+
+ \c XQVibra provides a very simple interface for us to use. The interesting
+ part are the three slots \c start(), \c stop() and \c setIntensity(). Calling the start
+ method initiates vibration for the specified duration. Calling it while the
+ device is already vibrating causes it to stop the current one and start the
+ new one, even if the intensities are the same. The \c setIntensity() method
+ should be called before starting vibration.
+
+
+ \section1 VibrationSurface Class Definition
+
+ \c VibrationSurface inherits from QWidget and acts like a controller for a
+ \c XQVibra object. It responds to mouse events and performs custom painting.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.h 0
+
+ The virtual event methods are reimplemented from QWidget. As can be seen,
+ there is no public programmable interface beyond what QWidget provides.
+
+
+ \section1 VibrationSurface Class Implementation
+
+ Mouse events control the intensity of the vibration.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 0
+ \codeline
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 1
+ \codeline
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 2
+
+ Presses starts the vibration, movement changes the intensity and releases
+ stops the vibration. To set the right amount of vibration, the private
+ method \c applyIntensity() is used. It sets the vibration intensity according to
+ which rectangle the mouse currently resides in.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 3
+
+ We make sure only to change the intensity if it is different than last
+ time, so that the vibrator isn't stopped and restarted unnecessarily.
+
+ The range of vibration intensity ranges from 0 to XQVibra::MaxIntensity. We
+ divide this range into a set of levels. The number of levels and the intensity
+ increase for each level are stored in two constants.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 4
+
+ Each rectangle has an intensity of one \c IntensityPerLevel more than the
+ previous one.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 5
+
+ The rectangles are either put in a row, if the widget's width is greater
+ than its height (landscape), otherwise they are put in a column (portrait).
+ Each rectangle's size is thus dependent on the length of the width or the
+ height of the widget, whichever is longer. The length is then divided by
+ the number of levels, which gets us either the height or the width of each
+ rectangle. The dx and dy specify the distance from one rectangle to the
+ next, which is the same as either the width or height of the rectangle.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 6
+
+ For each level of intensity, we draw a rectangle with increasing
+ brightness. On top of the rectangle a text label is drawn, specifying the
+ intesity of this level. We use the rectangle rect as a template for
+ drawing, and move it down or right at each iteration.
+
+ The intensity is calculated by dividing the greater of the width and height
+ into \c NumberOfLevels slices.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 7
+
+ In case the widget's geometry is too small to fit all the levels, the user
+ interface will not work. For simplicity, we just return 0.
+
+ When we know the axis along which the rectangles lie, we can find the one
+ in which the mouse cursor lie.
+
+ \snippet examples/widgets/symbianvibration/vibrationsurface.cpp 8
+
+ The final clamp of the intensity value at the end is necessary in case the
+ mouse coordinate lies outside the widget's geometry.
+
+
+ \section1 MainWindow Class Definition
+
+ Here's the definition of the \c MainWindow class:
+
+ \snippet examples/widgets/symbianvibration/mainwindow.h 0
+
+ \c MainWindow is a top level window that uses a \c XQVibra and a
+ \c VibrationSurface. It also adds a menu option to the menu bar which can
+ start a short vibration.
+
+ \section1 MainWindow Class Implementation
+
+ In the \c MainWindow constructor the \c XQVibra and the \c VibrationSurface
+ are created. An action is added to the menu and is connected to the vibrate
+ slot.
+
+ \snippet examples/widgets/symbianvibration/mainwindow.cpp 0
+
+ The \c vibrate() slot offers a way to invoke the vibration in case no
+ mouse is present on the device.
+
+ \snippet examples/widgets/symbianvibration/mainwindow.cpp 1
+
+ \section1 Symbian Vibration Library
+
+ The \c XQVibra class requires a platform library to be included. It is
+ included in the \c .pro file for the symbian target.
+
+ \quotefromfile examples/widgets/symbianvibration/symbianvibration.pro
+ \skipto /^symbian \{/
+ \printuntil /^\}/
+*/
diff --git a/doc/src/images/appicon_packagecontents.png b/doc/src/images/appicon_packagecontents.png
new file mode 100644
index 0000000000..49cb1e4229
--- /dev/null
+++ b/doc/src/images/appicon_packagecontents.png
Binary files differ
diff --git a/doc/src/images/appicon_screenshot.png b/doc/src/images/appicon_screenshot.png
new file mode 100644
index 0000000000..c29dd11d46
--- /dev/null
+++ b/doc/src/images/appicon_screenshot.png
Binary files differ
diff --git a/doc/src/images/cube.png b/doc/src/images/cube.png
new file mode 100644
index 0000000000..95dfc984dd
--- /dev/null
+++ b/doc/src/images/cube.png
Binary files differ
diff --git a/doc/src/images/cube_faces.png b/doc/src/images/cube_faces.png
new file mode 100644
index 0000000000..2c7102a94c
--- /dev/null
+++ b/doc/src/images/cube_faces.png
Binary files differ
diff --git a/doc/src/images/elidedlabel-example.png b/doc/src/images/elidedlabel-example.png
new file mode 100644
index 0000000000..741d2896e7
--- /dev/null
+++ b/doc/src/images/elidedlabel-example.png
Binary files differ
diff --git a/doc/src/images/maemovibration-example.png b/doc/src/images/maemovibration-example.png
new file mode 100644
index 0000000000..be975fc10a
--- /dev/null
+++ b/doc/src/images/maemovibration-example.png
Binary files differ
diff --git a/doc/src/images/orientation-landscape-ui.png b/doc/src/images/orientation-landscape-ui.png
new file mode 100644
index 0000000000..c591ff14d2
--- /dev/null
+++ b/doc/src/images/orientation-landscape-ui.png
Binary files differ
diff --git a/doc/src/images/orientation-landscape.png b/doc/src/images/orientation-landscape.png
new file mode 100644
index 0000000000..e606804d21
--- /dev/null
+++ b/doc/src/images/orientation-landscape.png
Binary files differ
diff --git a/doc/src/images/orientation-portrait-ui.png b/doc/src/images/orientation-portrait-ui.png
new file mode 100644
index 0000000000..304835b93e
--- /dev/null
+++ b/doc/src/images/orientation-portrait-ui.png
Binary files differ
diff --git a/doc/src/images/orientation-portrait.png b/doc/src/images/orientation-portrait.png
new file mode 100644
index 0000000000..3d778e8d90
--- /dev/null
+++ b/doc/src/images/orientation-portrait.png
Binary files differ
diff --git a/doc/src/images/symbianvibration-example.png b/doc/src/images/symbianvibration-example.png
new file mode 100644
index 0000000000..21461b6a19
--- /dev/null
+++ b/doc/src/images/symbianvibration-example.png
Binary files differ
diff --git a/doc/src/snippets/textdocument-listitemstyles/main.cpp b/doc/src/snippets/textdocument-listitemstyles/main.cpp
new file mode 100644
index 0000000000..6e40492c29
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitemstyles/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow *window = new MainWindow;
+ window->resize(640, 480);
+ window->show();
+ return app.exec();
+}
diff --git a/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp b/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp
new file mode 100644
index 0000000000..94e98b3400
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+
+MainWindow::MainWindow()
+{
+ QMenu *fileMenu = new QMenu(tr("&File"));
+
+ fileMenu->addAction(tr("E&xit"), this, SLOT(close()),
+ QKeySequence(tr("Ctrl+Q", "File|Exit")));
+
+ QMenu *insertMenu = new QMenu(tr("&Insert"));
+
+ insertMenu->addAction(tr("&List"), this, SLOT(insertList()),
+ QKeySequence(tr("Ctrl+L", "Insert|List")));
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(insertMenu);
+
+ editor = new QTextEdit(this);
+ document = new QTextDocument(this);
+ editor->setDocument(document);
+
+ setCentralWidget(editor);
+ setWindowTitle(tr("Text Document List Item Styles"));
+}
+
+void MainWindow::insertList()
+{
+ QTextCursor cursor = editor->textCursor();
+ cursor.beginEditBlock();
+
+ //! [add a styled, ordered list]
+ QTextListFormat listFormat;
+
+ listFormat.setStyle(QTextListFormat::ListDecimal);
+ listFormat.setNumberPrefix("(");
+ listFormat.setNumberSuffix(")");
+
+ cursor.insertList(listFormat);
+ //! [add a styled, ordered list]
+
+ cursor.endEditBlock();
+}
diff --git a/doc/src/snippets/textdocument-listitemstyles/mainwindow.h b/doc/src/snippets/textdocument-listitemstyles/mainwindow.h
new file mode 100644
index 0000000000..649a47bb16
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitemstyles/mainwindow.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <QMainWindow>
+
+class QTextDocument;
+class QTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+public slots:
+ void insertList();
+
+private:
+ QString currentFile;
+ QTextEdit *editor;
+ QTextDocument *document;
+};
+
+#endif
diff --git a/doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro b/doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro
new file mode 100644
index 0000000000..5da8d6e1a1
--- /dev/null
+++ b/doc/src/snippets/textdocument-listitemstyles/textdocument-listitemstyles.pro
@@ -0,0 +1,3 @@
+HEADERS = mainwindow.h
+SOURCES = main.cpp \
+ mainwindow.cpp
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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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.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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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_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_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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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.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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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